The TTRPG network
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
洪 民憙 (Hong Minhee)@lemmy.ml to JavaScript community@lemmy.mlEnglish · 9 months ago

I couldn't find a logging library that worked for my library, so I made one

hackers.pub

external-link
message-square
0
link
fedilink
  • cross-posted to:
  • nodejs@programming.dev
  • javascript@programming.dev
1
external-link

I couldn't find a logging library that worked for my library, so I made one

hackers.pub

洪 民憙 (Hong Minhee)@lemmy.ml to JavaScript community@lemmy.mlEnglish · 9 months ago
message-square
0
link
fedilink
  • cross-posted to:
  • nodejs@programming.dev
  • javascript@programming.dev
Library developers often struggle to balance providing sufficient debugging information with remaining unobtrusive to the end user. Traditional logging frameworks are typically designed for applications, forcing library authors to either impose specific configurations or leave users in the dark when troubleshooting complex protocols like ActivityPub. LogTape provides a solution through a hierarchical category system that ensures zero default output unless explicitly enabled by the application developer. By utilizing these categories, frameworks like Fedify can offer granular visibility into specific subsystems, such as HTTP signature verification or JSON-LD processing, without cluttering the console with internal chatter. Additionally, LogTape leverages implicit contexts and asynchronous local storage to enable seamless request tracing across asynchronous boundaries, allowing developers to correlate related logs through unique identifiers automatically. This approach supports modern runtimes including Node.js, Deno, and Bun, providing a consistent logging experience across diverse environments. By prioritizing an opt-in philosophy and structured data, library authors can provide high-quality observability while maintaining a clean developer experience. Adopting this strategy transforms logging from a potential nuisance into a powerful diagnostic tool for complex distributed systems.
alert-triangle
You must log in or # to comment.

JavaScript community@lemmy.ml

javascript@lemmy.ml

Subscribe from Remote Instance

Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: !javascript@lemmy.ml

A community about JavaScript, the ECMAScript standard, and programs that make use of JS such as Node.js.

Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 1 user / day
  • 1 user / week
  • 2 users / month
  • 36 users / 6 months
  • 1 local subscriber
  • 1.07K subscribers
  • 73 Posts
  • 15 Comments
  • Modlog
  • mods:
  • dinomug@lemmy.ml
  • mlaunois@lemmy.ml
  • BE: 0.19.18
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org