Tests all Logger methods: Trace/f/ln, Debug/f/ln, Info/f/ln,
Notice/f/ln, Warn/f/ln, Error/f/ln, Panic/f/ln, Print/f/ln,
Default(), SetInfoDepth, and panic-with-error behavior.
Previously these methods had near-zero direct test coverage.
* docs: add example programs for common usage patterns
Adds four focused examples in examples/ directory:
- basic: drop-in logger with web UI
- namespaces: namespace-based logging by component
- client: programmatic log client with filtering
- log-levels: all log levels and filtering
Fixes#7
* feat(slog): add slog.Handler adapter for log-socket
Implements log/slog.Handler that routes structured log records into the
log-socket broadcasting system. Supports namespaces, WithAttrs,
WithGroup, and configurable minimum level.
Also adds Broadcast() as a public entry point for adapter packages
that construct log.Entry values directly.
* chore: update to Go 1.26, resolve slog LogValuer values
Adds four focused examples in examples/ directory:
- basic: drop-in logger with web UI
- namespaces: namespace-based logging by component
- client: programmatic log client with filtering
- log-levels: all log levels and filtering
Fixes#7
- fix(stderr): CreateClient() with no args so stderr sees all namespaces,
not just 'default'. Previously namespaced logs were invisible on stderr.
- fix(logger): fileInfo depth offset to 2+FileInfoDepth so Logger methods
report the actual caller, not the log package itself. Default depth (0)
now correctly shows caller file:line.
- fix(panic): guard args[0] access with len(args) > 0 instead of >= 0.
Panic/Panicf/Panicln would index out of range when called with no args.
- fix(createLog): nil/initialized check before channel send to prevent
race with concurrent Destroy calls.
- chore: bump go.mod to 1.25.6
Adds ANSI color-coded log levels for terminal output:
- TRACE: Gray
- DEBUG: Cyan
- INFO: Green
- NOTICE: Blue
- WARN: Yellow
- ERROR/PANIC/FATAL: Red (bold for PANIC/FATAL)
Colors are auto-detected based on terminal capability and can be
controlled via SetColorEnabled()/ColorEnabled().
Fixes#9