Thursday, May 9, 2024
Show HN: Loglayer: A fluid logging interface for JavaScript loggers https://ift.tt/Sn2vwRt
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 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. 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 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/wMv5tNS May 10, 2024 at 12:15AM
Subscribe to:
Post Comments (Atom)
Show HN: OctAPI – Visualize API Routes Directly in VS Code https://ift.tt/v6irJtI
Show HN: OctAPI – Visualize API Routes Directly in VS Code Started noticing issues while working with friends that I thought only I was enco...
-
Show HN: High school robotics code/CAD/design binder release Hello HN! My name is Patrick, and I am a junior at my High School’s FRC robotic...
-
Show HN: D&D meets Siri – Interactive voice adventure Hey HN! I've been building tooling for voice-driven apps over the past few mon...
-
Show HN: I Made an AI Social Media Manager to Automate Content Creation Hey HN, I am a Solopreneur, and I love building apps to automate bor...
No comments:
Post a Comment