Zum Hauptinhalt springen
tsecurity.de LIVE
Echtzeit-Radar & Feeds
Alle RSS Feeds
👥 Community & Social
YouTube Security VideosLinus Tech Tips: I Thought These Guys Made Cables(21.09.2026 um 19:15 Uhr)
Sicherheitslücken (CVE)GitHub Actions leaking secrets when Miri output is cached(21.09.2026 um 02:00 Uhr)
Sichere ProgrammierungBuilding a Polymarket TWAP Momentum Reversal Detector(21.09.2026 um 20:02 Uhr)
Sichere ProgrammierungWhy Does RAG Miss Information That's Clearly in the Document?(21.09.2026 um 20:04 Uhr)
YouTube Security VideosLinus Tech Tips: I Thought These Guys Made Cables(21.09.2026 um 19:15 Uhr)
Sicherheitslücken (CVE)GitHub Actions leaking secrets when Miri output is cached(21.09.2026 um 02:00 Uhr)
Sichere ProgrammierungBuilding a Polymarket TWAP Momentum Reversal Detector(21.09.2026 um 20:02 Uhr)
Sichere ProgrammierungWhy Does RAG Miss Information That's Clearly in the Document?(21.09.2026 um 20:04 Uhr)
Intelligence View
⚡ tsecurity.de Intelligence

Your console.log deserves better

I kept copy-pasting the same logging code into every new project. Eventually I just packaged it up. It's called logfx — a tiny library that makes your console output a bit easier to read. The problem I kept running i…

0
↗ Quelle (dev.to)
Reagiere als Erste:r — dein Feedback zählt!

I kept copy-pasting the same logging code into every new project. Eventually I just packaged it up. It's called logfx — a tiny library that makes your console output a bit easier to read.






The problem I kept running into






console.log('DEBUG: starting process')
console.log('INFO: connected')
console.log('ERROR: something broke')






It works, but it's hard to scan. Everything looks the same.






A small improvement






import { log } from 'logfx'

log.debug('Starting process')
log.info('Connected')
log.error('Something broke')






Output:




🔍 DEBUG   Starting process
💡 INFO Connected
🔴 ERROR Something broke






Just a bit of color and structure — but it makes a difference when you're debugging.






When logfx might help



logfx is a lightweight option for when you want:





  • Something simple — no config, just import and go


  • Readable dev logs — easier to scan in your terminal


  • A small footprint — ~2KB gzipped, zero dependencies


  • Quick projects — prototypes, scripts, side projects


  • Universal support — Node.js, browsers, Bun, Deno






What's inside



Lightweight


~2KB gzipped with zero dependencies. Tried to keep it minimal.



Nice defaults


Colors and structure out of the box — no setup needed.



TypeScript support


Built in TypeScript with full type inference.



Smart log levels


Debug logs auto-hide in production.



Transports


Console, file, webhook — in case you need to send logs somewhere.





A few examples



Namespaced loggers:




import { logger } from 'logfx'

const auth = logger('auth')
const db = logger('db')

auth.success('User logged in')
// ✅ SUCCESS [auth] User logged in

db.info('Query executed')
// 💡 INFO [db] Query executed






Timers:




import { time, timeEnd } from 'logfx'

time('api-call')
await fetch('/data')
timeEnd('api-call')
// ⏱️ api-call: 245.32ms






Pretty boxes:




import { box } from 'logfx'

box('Server running on port 3000', { title: 'Ready' })









╭─ Ready ─────────────────────────╮
│ Server running on port 3000 │
╰─────────────────────────────────╯






Tables:




import { table } from 'logfx'

table([
{ name: 'John', role: 'Admin' },
{ name: 'Jane', role: 'User' },
])









┌─────────┬─────────┐
│ name │ role │
├─────────┼─────────┤
│ John │ Admin │
│ Jane │ User │
└─────────┴─────────┘






JSON output:




import { createLogger, transports } from 'logfx'

const log = createLogger({
transports: [transports.console({ format: 'json' })]
})

log.info('Request', { method: 'GET', path: '/api' })
// {"timestamp":"2025-12-18T...","level":"info","message":"Request","method":"GET","path":"/api"}









Try it out






npm install logfx









Links



Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten Your console.log deserves better

Thematisch verwandte Begriffe: Your, consolelog, deserves, better · 6 Treffer

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Zum Aktualisieren ziehen
ZERO-DAY CVE-2026-63416 | draw.io is a configurable diagramming and whiteboarding application. Pri…
Advisory →
TTS Reader • tsecurity.de Voice
tsecurity.de Icon
tsecurity.de App
Offline-Lesen, Eilmeldungen & 0ms Ladezeit

Installiere tsecurity.de direkt auf deinen Home-Bildschirm für das ultimative Vollbild-Magazinerlebnis ohne Browser-Leisten.

Nächster Beitrag
Themen-Radar & Intelligence Matrix
Echtzeit-Taxonomie nach Angriffsvektoren & Plattformen

tsecurity.de Live Threat Radar

🔴 LIVE RADAR
MONITORING
AKTIV
CVE-DATENBANK
LIVE
🔍
Community Radar & Live Chat
Sentinel Bot online • Live-Stream
Dein Cluster: Security Explorer
Match:
lädt…
Verbindung zum Community-Stream wird aufgebaut...
Bearbeitungsmodus — Senden überschreibt deine Nachricht
Community-Puls — was gerade passiert
lädt…
Aktivitäten deiner Analysten
lädt…
Neues Thema oder Eilmeldung einreichen

Reiche interessante Links, Zero-Days oder Debatten ein. Die Community entscheidet per Upvote über die Veröffentlichung.

Heiß diskutierte Einreichungen
🔖 Gespeicherte Artikel
📂 Keine gespeicherten Artikel vorhanden.
Zurück Ziehen Vor
Links: vorheriger Artikel Rechts: nächster Artikel unten: schließen
News NIS-2 Frühwarnung Tier-1 Intel ⏱️ 3 Min vor 10 Min
Artikeldaten werden geladen...

Zurück: vorheriger Vor: nächster
↗ Original-Quelle
Social Reaktionen Deine Reaktion zählt
Einstufung & Relevanz-Poll 0 Stimmen
In sozialen Netzwerken teilen 1-Klick