An octal repr of permissions is supposed to be used here for working correctly.
This commit is contained in:
parent
f92267a288
commit
f3685c999e
@ -20,7 +20,7 @@ type Logger struct {
|
|||||||
// NewLogger creates a Logger instance with given filename and
|
// NewLogger creates a Logger instance with given filename and
|
||||||
// toStdout tells wether to write to Stdout as well or not.
|
// toStdout tells wether to write to Stdout as well or not.
|
||||||
func NewLogger(path string, toStdout bool) (*Logger, error) {
|
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 {
|
if err != nil {
|
||||||
return nil, errors.Wrap(err, "failed to open log file")
|
return nil, errors.Wrap(err, "failed to open log file")
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user