1
0
Fork 0

An octal repr of permissions is supposed to be used here for working correctly.

This commit is contained in:
Alexander Andreev 2022-02-07 21:50:38 +04:00
parent f92267a288
commit f3685c999e
Signed by: Arav
GPG Key ID: 1327FE8A374CC86F
1 changed files with 1 additions and 1 deletions

View File

@ -20,7 +20,7 @@ type Logger struct {
// NewLogger creates a Logger instance with given filename and
// toStdout tells wether to write to Stdout as well or not.
func NewLogger(path string, toStdout bool) (*Logger, error) {
f, err := os.OpenFile(path, os.O_WRONLY|os.O_APPEND|os.O_CREATE, os.ModeAppend)
f, err := os.OpenFile(path, os.O_WRONLY|os.O_APPEND|os.O_CREATE, 0660)
if err != nil {
return nil, errors.Wrap(err, "failed to open log file")
}