diff --git a/app/apinto/log.go b/app/apinto/log.go new file mode 100644 index 00000000..d75ecf2d --- /dev/null +++ b/app/apinto/log.go @@ -0,0 +1,16 @@ +package main + +import ( + "github.com/eolinker/eosc/log" + "os" +) + +func InitCLILog() { + formatter := &log.LineFormatter{ + TimestampFormat: "2006-01-02 15:04:05", + CallerPrettyfier: nil, + } + transport := log.NewTransport(os.Stdout, log.ErrorLevel) + transport.SetFormatter(formatter) + log.Reset(transport) +} diff --git a/app/apinto/main.go b/app/apinto/main.go index d947dac8..34f41ea4 100644 --- a/app/apinto/main.go +++ b/app/apinto/main.go @@ -29,6 +29,8 @@ func init() { process.Register(eosc.ProcessMaster, ProcessMaster) process.Register(eosc.ProcessHelper, ProcessHelper) process.Register(eosc.ProcessAdmin, ProcessAdmin) + + InitCLILog() } func main() {