Skip to content

Commit

Permalink
cmdr: godoc to logz/
Browse files Browse the repository at this point in the history
  • Loading branch information
hedzr committed Feb 1, 2025
1 parent 854608f commit 8e992de
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions pkg/logz/logz.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// Package logz is a tiny wrapper to logg/slog.
package logz

import (
Expand Down Expand Up @@ -153,9 +154,9 @@ func WrappedLogger() *stdlog.Logger { return Logger }
func init() {
onceLog.Do(func() {
log00 := logz.New("[cmdr]") // .SetLevel(logz.DebugLevel)
log = log00.
WithSkip(1) // extra stack frame(s) shall be ignored for dbglog.Info/...
log00.Verbose("init dbglog")
log = log00. // make a child logger here.
WithSkip(1) // extra stack frame(s) shall be ignored for dbglog.Info/...
log00.Verbose("init logz")

sll := logz.NewSlogHandler(log, &logz.HandlerOptions{
NoColor: false,
Expand Down

0 comments on commit 8e992de

Please sign in to comment.