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