Documentation
¶
Overview ¶
Example ¶
package main import ( "sync" log "github.com/mrodden/logr" "github.com/mrodden/logr/env_logger" ) func main() { env_logger.Init() log.Info("Hello Logging") log.Debug("Debug message output") wg := sync.WaitGroup{} wg.Add(1) go func() { log.Warn("Warning from inside a goroutine") wg.Done() }() log.Infof("Info format: %#v", wg) wg.Wait() }
Output:
Index ¶
- func Caller(depth int) (string, string, uint)
- func CallerPackageName(depth int) string
- func Debug(v ...any)
- func Debugf(format string, v ...any)
- func Error(v ...any)
- func Errorf(format string, v ...any)
- func Fatal(v ...any)
- func Fatalf(format string, v ...any)
- func Info(v ...any)
- func Infof(format string, v ...any)
- func RSplitN(s, sep string, n int) []string
- func Trace(v ...any)
- func Tracef(format string, v ...any)
- func Warn(v ...any)
- func Warnf(format string, v ...any)
- func Warning(v ...any)
- func Warningf(format string, v ...any)
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Caller ¶
Caller returns the filename and line number of the function at the specified depth up the callstack
func CallerPackageName ¶
CallerPackageName returns the name of the go package of the function at specified depth up the callstack
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.