This is a autopost bolg frinds we are trying to all latest sports,news,all new update provide for you
Thursday, May 9, 2024
Show HN: Loglayer: A fluid logging interface for JavaScript loggers https://ift.tt/z6ye30h
Show HN: 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 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). https://ift.tt/KuCvhl2 May 10, 2024 at 12:15AM
Subscribe to:
Post Comments (Atom)
Show HN: Tablr – Supabase with AI Features https://ift.tt/ltABMro
Show HN: Tablr – Supabase with AI Features https://www.tablr.dev/ June 30, 2025 at 04:35AM
-
Show HN: Locksmith – detect locks taken by Postgres migrations https://ift.tt/0cBueJt February 10, 2025 at 02:26AM
-
Show HN: I built a FOSS tool to run your Steam games in the Cloud I wanted to play my Steam games but my aging PC couldn’t keep up, so I bui...
-
Show HN: TNX API – Natural Language Interactions with Your Database Hey HN! I built TNX API to make working with databases as simple as aski...
No comments:
Post a Comment