1
0
mirror of https://github.com/taigrr/log-socket synced 2026-03-20 19:32:25 -07:00

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
This commit is contained in:
2026-02-17 08:30:52 +00:00
parent 6a709d3963
commit 47bfb5ed98
3 changed files with 37 additions and 34 deletions

2
go.mod
View File

@@ -1,5 +1,5 @@
module github.com/taigrr/log-socket/v2
go 1.25.4
go 1.25.6
require github.com/gorilla/websocket v1.5.3