mirror of
https://github.com/astaxie/beego.git
synced 2024-11-22 15:00:54 +00:00
Merge pull request #2307 from CodeJuan/master
set perm of rotated log to 440
This commit is contained in:
commit
eba6afd6fb
@ -270,6 +270,7 @@ func (w *fileLogWriter) doRotate(logTime time.Time) error {
|
|||||||
// Rename the file to its new found name
|
// Rename the file to its new found name
|
||||||
// even if occurs error,we MUST guarantee to restart new logger
|
// even if occurs error,we MUST guarantee to restart new logger
|
||||||
err = os.Rename(w.Filename, fName)
|
err = os.Rename(w.Filename, fName)
|
||||||
|
err = os.Chmod(fName, os.FileMode(440))
|
||||||
// re-start logger
|
// re-start logger
|
||||||
RESTART_LOGGER:
|
RESTART_LOGGER:
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user