mirror of
https://github.com/taigrr/log-socket
synced 2026-03-20 19:32:25 -07:00
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)
This commit is contained in:
@@ -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...)
|
||||
|
||||
Reference in New Issue
Block a user