Introduction
Lumberjack (@ngworker/lumberjack) is an Angular logging library built around
log drivers: small plugins that receive structured logs and write them
somewhere (the browser console, an HTTP store, a community backend, or your own
sink).
You register Lumberjack once at bootstrap, enable the drivers you need, then
emit logs through LumberjackService or — preferably — small
application-specific logger classes.
Most apps need more than console.log: different destinations per environment,
different severity filters per destination, and structured fields that survive
the trip to a log store. Lumberjack keeps that plumbing out of feature code —
feature code logs once, and every registered driver that accepts the log’s level
receives it. How log drivers work
covers the full pipeline.
What you get out of the box
Section titled “What you get out of the box”| Package | Role |
|---|---|
@ngworker/lumberjack | Core: provideLumberjack, LumberjackService, loggers, types |
@ngworker/lumberjack/console-driver | Browser console driver |
@ngworker/lumberjack/http-driver | POST logs to an HTTP store with retries |
Community drivers cover other backends; see Use a community driver.
Next steps
Section titled “Next steps”- Quick start — install, register, log once
- Write a logger — structured app loggers
- How log drivers work — mental model