MCPcopy
hub / github.com/op/go-logging / GetLogger

Function GetLogger

logger.go:112–114  ·  view source on GitHub ↗

TODO call NewLogger and remove MustGetLogger? GetLogger creates and returns a Logger object based on the module name.

(module string)

Source from the content-addressed store, hash-verified

110
111// GetLogger creates and returns a Logger object based on the module name.
112func GetLogger(module string) (*Logger, error) {
113 return &Logger{Module: module}, nil
114}
115
116// MustGetLogger is like GetLogger but panics if the logger can't be created.
117// It simplifies safe initialization of a global logger for eg. a package.

Callers 1

MustGetLoggerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected