defer flushing log

This commit is contained in:
lwch
2021-08-19 12:20:33 +08:00
parent bd53a169cc
commit b7712e3784
2 changed files with 2 additions and 0 deletions

View File

@@ -32,6 +32,7 @@ func main() {
cfg := global.LoadConf(*conf)
logging.SetSizeRotate(cfg.LogDir, "np-svr", int(cfg.LogSize.Bytes()), cfg.LogRotate, true)
defer logging.Flush()
cert, err := tls.LoadX509KeyPair(cfg.TLSCrt, cfg.TLSKey)
runtime.Assert(err)