Compare commits
No commits in common. "master" and "v1.0.8" have entirely different histories.
3
main.go
3
main.go
|
@ -57,11 +57,9 @@ type LoggersConfig struct {
|
||||||
Appenders map[string]LogAppenderConfig `json:"appenders"`
|
Appenders map[string]LogAppenderConfig `json:"appenders"`
|
||||||
Categories map[string]LogConfig `json:"categories"`
|
Categories map[string]LogConfig `json:"categories"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Logger represents a logger instance for a specific category.
|
// Logger represents a logger instance for a specific category.
|
||||||
// It maintains the log level and appenders for that category.
|
// It maintains the log level and appenders for that category.
|
||||||
// Example:
|
// Example:
|
||||||
//
|
|
||||||
// logger := GetLogger("mycategory")
|
// logger := GetLogger("mycategory")
|
||||||
// logger.Info("This is an info message")
|
// logger.Info("This is an info message")
|
||||||
// logger.Error("This is an error message")
|
// logger.Error("This is an error message")
|
||||||
|
@ -205,5 +203,4 @@ func RegistAppender(typeName string, appenderCreatCb func(LogAppenderConfig) *Lo
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
loggerMap["default"] = defaultLogger
|
loggerMap["default"] = defaultLogger
|
||||||
appenders["console"] = &consoleAppender
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue