1
0
mirror of https://github.com/taigrr/log-socket synced 2026-03-20 17:12:24 -07:00

feat(log): add Logger.Debugln, expand test coverage, update Go/CI (#21)

- 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)
This commit is contained in:
2026-03-06 11:38:31 -05:00
committed by GitHub
parent 5cb1329155
commit 99882832c0
5 changed files with 491 additions and 69 deletions

View File

@@ -92,6 +92,20 @@ func (l Logger) Debugf(format string, args ...any) {
createLog(e)
}
// Debugln prints out logs on debug level with a newline
func (l Logger) Debugln(args ...any) {
output := fmt.Sprintln(args...)
e := Entry{
Timestamp: time.Now(),
Output: output,
File: fileInfo(2 + l.FileInfoDepth),
Level: "DEBUG",
level: LDebug,
Namespace: l.Namespace,
}
createLog(e)
}
// Info prints out logs on info level
func (l Logger) Info(args ...any) {
output := fmt.Sprint(args...)