mirror of
https://github.com/fluffle/goirc
synced 2025-05-12 18:44:50 +00:00
Fix up half-arsed logging shims; set depth.
This commit is contained in:
parent
a3debed539
commit
d1162c0f7b
3 changed files with 37 additions and 8 deletions
15
logging/golog/golog.go
Normal file
15
logging/golog/golog.go
Normal file
|
@ -0,0 +1,15 @@
|
|||
package golog
|
||||
|
||||
import (
|
||||
log "github.com/fluffle/golog/logging"
|
||||
"github.com/fluffle/goirc/logging"
|
||||
)
|
||||
|
||||
// Simple adapter to utilise my logging package with goirc.
|
||||
// Just import this package alongside goirc/client and call
|
||||
// golog.Init() in your main() to set things up.
|
||||
func Init() {
|
||||
l := log.InitFromFlags()
|
||||
l.SetDepth(1)
|
||||
logging.SetLogger(l)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue