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

13 Commits

Author SHA1 Message Date
9395e417c6 feat(log): add Logger.Debugln, expand test coverage, update Go/CI
- Add missing Logger.Debugln method (package-level Debugln existed but
  Logger type lacked it)
- Replace empty test stubs with real tests for Debug, Debugf, Info,
  Infof, Print, Printf, Notice, Warn, Warnf, Error, Errorf, Panic,
  Panicf, Panicln
- Add tests for namespace filtering, multi-namespace clients,
  namespace registry, level storage, colorize, parseLevelString,
  Broadcast, matchesNamespace, fileInfo, Logger.Debugln,
  empty namespace default
- Update go.mod to Go 1.26.1
- Update CI to actions/checkout@v4, actions/setup-go@v5, Go 1.26,
  add -race flag, trigger on pull_request
- Fix stale CRUSH.md references (Go version, CI config, stderr bug)
2026-03-06 11:03:47 +00:00
5cb1329155 feat(slog): add slog.Handler adapter (#20)
* 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
2026-03-01 22:48:12 -05: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
f86c2dbf46 enable namespaced logging 2025-11-10 16:07:28 -05:00
Daniel Merja
45ba154d1e Update Go version to 1.24.4 and overhaul viewer.html with a complete redesign for improved log display and user interaction. (#13) 2025-06-29 02:11:12 -07:00
1c00bc90b8 upgrade deps, readme 2025-05-01 18:27:46 -07:00
f114098a8c uodate go version 2023-08-26 22:00:42 -07:00
0fa4de7961 Revert "add ability to embed other loggers of varying functionality"
This reverts commit 50c507c8f4.
2023-03-29 14:06:00 -07:00
50c507c8f4 add ability to embed other loggers of varying functionality 2023-03-29 14:02:57 -07:00
2492509b6b extract browser from string var, upgrade deps 2022-10-14 22:14:47 -07:00
d21c91379e update go compiler target version 2021-08-17 10:07:07 -07:00
159e6a4d3a Adds logger directory refactor 2021-04-08 21:20:57 -07:00
cbd4896d05 Initial commit based on logrus 2021-04-08 15:12:07 -07:00