dan,
@dan@upvote.au avatar

The issue I usually have with these logging libraries is that they often don’t handle structured data well, which is something that’s commonly needed in a logging library.

For example, it’s fine for log entries to be a string when logging to console or a text file, but if you add a sink that logs to a database, service (Sentry, Loki, NewRelic, whatever), or JSON file, you’ll generally want some sort of structured data. At the minimum, you’d want the format string (e.g. “Unable to find {id}”) and the variables (e.g. {“id”:123}) to be stored separately, so that you can get aggregated counts for how often each error is being thrown regardless of the variables.

hongminhee, (edited )
@hongminhee@lemmy.ml avatar

LogTape author here.

LogTape also supports structured logging. Structured values are kept in https://jsr.io/@logtape/logtape/doc/~/LogRecord#property_properties. Please see how to use the JSON formatter.

dan,
@dan@upvote.au avatar

Thanks for the details!! Sorry I didn’t notice that.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • javascript@programming.dev
  • rosin
  • thenastyranch
  • mdbf
  • DreamBathrooms
  • InstantRegret
  • magazineikmin
  • Youngstown
  • cisconetworking
  • slotface
  • vwfavf
  • everett
  • Durango
  • kavyap
  • GTA5RPClips
  • megavids
  • khanakhh
  • osvaldo12
  • ngwrru68w68
  • normalnudes
  • anitta
  • ethstaker
  • cubers
  • modclub
  • tacticalgear
  • provamag3
  • Leos
  • tester
  • JUstTest
  • All magazines