[mzizi] prefix so one grep finds everything across every
service.
Install
log
A structured logger with four levels — debug, info, warn, error. Output is prefixed with
[mzizi] and optionally scoped to a module.
createLogger
Binds a logger to a module name. Use it in any file that logs more than once.
measure
Times a synchronous or asynchronous function, logs the duration on success and on failure,
and returns the function’s result.
perf; pass a module to scope it to your own.
trackError
Records an error without rethrowing it, wrapping a non-Error value automatically.
Be careful what you put in
data. It goes to the log, so it is subject to whatever your log
retention and access rules are — an identifier is usually enough, and the record it points at
is usually not.Error boundaries log automatically
SectionErrorBoundary calls the logger itself, so wrapping a section is the whole integration:
Grep patterns
The square brackets need escaping in a basic grep — unescaped,
[mzizi] is a character class
matching a single letter, which matches almost every line in the file and looks like it
worked.