Lilac was born out of frustration with existing logging libraries that were bloated with dependencies. The goal was to build a zero-dependency, strongly-typed logger that supports custom transports and structured JSON logging out of the box.
Lilac Zero-Dependency Logging.
Lilac was born out of frustration with existing logging libraries that were bloated with dependencies. The goal was to build a zero-dependency, strongly-typed logger that supports custom transports and structured JSON logging out of the box.
EXECUTIVE SUMMARY
"Implemented a lazy-evaluation mechanism for log arguments, ensuring complex object stringification only occurs if the log level is active, saving considerable CPU cycles in production."
SYSTEM ARCHITECTURE
High-level overview of the control and data plane components.
CORE SYSTEM
Zero-dependency TypeScript logging core
Pluggable sink interface for log routing
OUTPUT SINKS
Standard out/err with rich formatting
Local file system logging transport
Network transports for observability
ENGINEERING STACK
Zero-dependency utility package optimized for NPM.
LANGUAGE
BUILD & TOOLING
CI/CD
TECHNICAL DECISIONS
Documenting the trade-offs and architectural shifts during development.
Dependency Management
MEASURABLE IMPACT
Metrics tracking package efficiency and adoption.
POSTMORTEM & LEARNINGS
Learnings from maintaining open-source tooling.
The strict TypeScript generic bindings for log metadata allowed developers to catch schema errors at compile-time rather than runtime, which became the most praised feature of the library.
Adding native OpenTelemetry integration as a default transport to automatically trace logs across microservice boundaries without additional configuration.