utils/log: support max days of keeping log files

This commit is contained in:
fatedier
2016-05-03 21:41:57 +08:00
parent d7797cbd18
commit c10321ead6
8 changed files with 25 additions and 10 deletions

View File

@@ -90,7 +90,7 @@ func main() {
server.BindPort = bindPort
}
log.InitLog(server.LogWay, server.LogFile, server.LogLevel)
log.InitLog(server.LogWay, server.LogFile, server.LogLevel, server.LogMaxDays)
l, err := conn.Listen(server.BindAddr, server.BindPort)
if err != nil {
@@ -98,6 +98,7 @@ func main() {
os.Exit(1)
}
// create vhost if VhostHttpPort != 0
if server.VhostHttpPort != 0 {
vhostListener, err := conn.Listen(server.BindAddr, server.VhostHttpPort)
if err != nil {