nowfound

Dev tools · May 9, 2024

LA

Loglayer: A fluid logging interface for JavaScript loggers

This has been in use on our production systems for around two years now at Switchboard (https://switchboard.app). The problem we had was that we were using two different logging libs for our frontend and backend at the time (specifically roarr, and bunyan), and the API for the logging libs were not compatible with each other. Loglayer was designed to wrap around popular JS logging libraries where you can swap out any underlying library without re-writing your log entries to adapt to the new library. One common example is using plain "console" as a starting integration, but later…

What it does

In the maker’s words, at launch

This has been in use on our production systems for around two years now at Switchboard (https://switchboard.app). The problem we had was that we were using two different logging libs for our frontend and backend at the time (specifically roarr, and bunyan), and the API for the logging libs were not compatible with each other. Loglayer was designed to wrap around popular JS logging libraries where you can swap out any underlying library without re-writing your log entries to adapt to the new library. One common example is using plain "console" as a starting integration, but later swapping to a logging library like Winston once you've nailed down which JS logging lib fits your use-case. You can also swap to another from there (which we have done from bunyan to pino on our backend) if you need to later on. It also provides a fluid API that standardizes how one should feed error, set context, and metadata. This means regardless of the underlying logging library used, developers use the same API to write logs throughout. log .withMetadata({ some: 'data'}) .withError(new Error('test')) .info('my message') With this new 4.x release, I added a plugin system allowing you to manipulate data before it is shipped to the underlying JS logger).

Does the same job

all alternatives →

More dev tools this month

the category →
  • Dograh592

    The open source VAPI alternative

    Dev tools · 25d ago · dograh.com

  • Meridian530

    Don't let your work go unnoticed. Get promoted!

    Dev tools · 20d ago · meridiona.com

  • x1516

    Lovable for iPhone apps go from idea to App Store

    Dev tools · 11d ago · x1.new

  • Open-source GTM skills for technical founders

    Dev tools · 29d ago · gtmcofounder.com

  • OpenTrailPaper is open-source bike computer firmware for the LilyGO T5S3 4.7" E-Paper PRO. It supports offline maps, GPX routes, FIT recording and Bluetooth sensors.

    Dev tools · 1d ago · opentrailpaper.com

  • Nuphos380

    The AI-Native DevOps Workspace.

    Dev tools · 24d ago · nuphos.ai

Launched alongside, May 2024

the whole month →
  • Voicenotes1,487

    AI note-taker that's truly intelligent

    AI · 2024 · voicenotes.com

  • Wegic1,181

    The first AI web designer & developer by your side

    Dev tools · 2024 · wegic.ai

  • Insighto1,110

    Ship features users want

    Growth · 2024 · insigh.to

  • Ivee1,087

    The B2B influencer marketing platform

    Growth · 2024

  • Waxwing1,035

    AI copilot for every marketing task

    AI · 2024

  • AI powered zero-waste meal planner

    AI · 2024 · ohapotato.app