mirror of
https://git.phreedom.club/localhost_frssoft/bloat.git
synced 2024-12-01 10:56:38 +00:00
Fix logfile
This commit is contained in:
parent
a57a142328
commit
c41f9272f9
3
main.go
3
main.go
|
@ -90,7 +90,8 @@ func main() {
|
||||||
if len(config.LogFile) < 1 {
|
if len(config.LogFile) < 1 {
|
||||||
logger = log.New(os.Stdout, "", log.LstdFlags)
|
logger = log.New(os.Stdout, "", log.LstdFlags)
|
||||||
} else {
|
} else {
|
||||||
lf, err := os.Open(config.LogFile)
|
lf, err := os.OpenFile(config.LogFile,
|
||||||
|
os.O_WRONLY|os.O_CREATE|os.O_APPEND, 0644)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
errExit(err)
|
errExit(err)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue