1
0
mirror of https://github.com/taigrr/log-socket synced 2026-03-20 16:02:28 -07:00
Commit Graph

8 Commits

Author SHA1 Message Date
90471833d0 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.
2026-03-02 03:44:15 +00:00
47bfb5ed98 fix: stderr namespace filter, fileInfo depth, panic guard, race safety
- 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
2026-02-17 08:31:21 +00:00
6a709d3963 feat(log): add colored terminal output without external packages (#16)
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
2026-02-17 03:27:53 -05:00
f86c2dbf46 enable namespaced logging 2025-11-10 16:07:28 -05:00
1c00bc90b8 upgrade deps, readme 2025-05-01 18:27:46 -07:00
e21fb8a614 make pass gofumpt 2022-10-14 22:23:42 -07:00
Ethan Holz
430181e3a2 feat: Updated to include print and added ln variants for all logs 2022-10-13 09:59:04 -05:00
63ed3a2ad7 logger => log 2021-08-23 21:12:21 -07:00