1
0
mirror of https://github.com/astaxie/beego.git synced 2024-12-22 22:10:48 +00:00

set perm of rotated log to 440

This commit is contained in:
codejuan 2016-12-06 12:44:00 +08:00
parent b635af5a8c
commit b788d74fd1

View File

@ -270,6 +270,7 @@ func (w *fileLogWriter) doRotate(logTime time.Time) error {
// Rename the file to its new found name
// even if occurs error,we MUST guarantee to restart new logger
err = os.Rename(w.Filename, fName)
err = os.Chmod(fName, os.FileMode(440))
// re-start logger
RESTART_LOGGER: