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

@@ -34,6 +34,7 @@ func main() {
cfg := global.LoadConf(*conf)
logging.SetSizeRotate(cfg.LogDir, "np-cli", int(cfg.LogSize.Bytes()), cfg.LogRotate, true)
defer logging.Flush()
conn, err := tls.Dial("tcp", cfg.Server, nil)
runtime.Assert(err)