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, 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 with just 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. It also provides a fluid API that standardizes how one should feed errors and 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 release, I added a plugin system allowing you to manipulate data before it is shipped to the underlying JS logger). https://ift.tt/oxpZmR4 May 10, 2024 at 12:15AM
Show HN: Loglayer: A fluid logging interface for JavaScript loggers https://ift.tt/AgMxfSO
Related Articles
Show HN: About Deep Learning, Machine Learning and Neural Networks https://ift.tt/3fn8gGPShow HN: About Deep Learning, Machine Learning and Neural Networks htt… Read More
Show HN: Hosted Blazor+Fusion sample (real-time WASM and .NET 5 app) https://ift.tt/33eGWWeShow HN: Hosted Blazor+Fusion sample (real-time WASM and .NET 5 app) h… Read More
Show HN: A collaboration and communication tool for scientists https://ift.tt/33OOSO2Show HN: A collaboration and communication tool for scientists http://… Read More
Show HN: Like Hacker News for VR Startups https://ift.tt/35SuRYHShow HN: Like Hacker News for VR Startups http://spatialape.com Novemb… Read More
Show HN: A GPS for any map (Android app) https://ift.tt/3l4vmTKShow HN: A GPS for any map (Android app) https://ift.tt/2HLlwIU Novemb… Read More
Show HN: A simple way to make HTML websites https://ift.tt/3kSTfNZShow HN: A simple way to make HTML websites https://ift.tt/2J1XoBL Nov… Read More
Show HN: NFreezer – Encrypted-at-rest remote backup tool https://ift.tt/36chQZSShow HN: NFreezer – Encrypted-at-rest remote backup tool https://ift.t… Read More
Show HN: Search speed metrics for any site on the web https://ift.tt/3oab3pUShow HN: Search speed metrics for any site on the web https://ift.tt/3… Read More
0 Comments: