2018-05-27 22:40:42 +08:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/op/go-logging"
|
|
|
|
)
|
|
|
|
|
|
|
|
var logger *logging.Logger
|
|
|
|
|
2018-07-24 14:42:03 +08:00
|
|
|
func loggerCreate() error {
|
2018-05-27 22:40:42 +08:00
|
|
|
format := logging.MustStringFormatter("[%{level}] %{shortfile} %{shortfunc}(): %{message}")
|
|
|
|
logging.SetFormatter(format)
|
|
|
|
logger = logging.MustGetLogger("commento")
|
|
|
|
|
|
|
|
return nil
|
|
|
|
}
|