TODO call NewLogger and remove MustGetLogger? GetLogger creates and returns a Logger object based on the module name.
(module string)
| 110 | |
| 111 | // GetLogger creates and returns a Logger object based on the module name. |
| 112 | func 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. |