mirror of
https://github.com/fhmq/hmq.git
synced 2026-04-24 10:38:34 +00:00
log formar
This commit is contained in:
18
main.go
18
main.go
@@ -9,6 +9,24 @@ import (
|
||||
log "github.com/cihub/seelog"
|
||||
)
|
||||
|
||||
func init() {
|
||||
testConfig := `
|
||||
<seelog type="sync">
|
||||
<outputs formatid="main">
|
||||
<console/>
|
||||
</outputs>
|
||||
<formats>
|
||||
<format id="main" format="Time:%Date %Time%tfile:%File%tlevel:%LEVEL%t%Msg%n"/>
|
||||
</formats>
|
||||
</seelog>`
|
||||
|
||||
logger, err := log.LoggerFromConfigAsBytes([]byte(testConfig))
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
log.ReplaceLogger(logger)
|
||||
}
|
||||
|
||||
func main() {
|
||||
runtime.GOMAXPROCS(runtime.NumCPU())
|
||||
runtime.GC()
|
||||
|
||||
Reference in New Issue
Block a user