mirror of
https://github.com/charmbracelet/glow
synced 2024-12-12 13:12:32 +00:00
fix: yet another log handling fix
This commit is contained in:
parent
a1a85636ea
commit
3f9102d116
1 changed files with 2 additions and 2 deletions
4
log.go
4
log.go
|
@ -24,12 +24,12 @@ func setupLog() (func() error, error) {
|
|||
}
|
||||
if err := os.MkdirAll(filepath.Dir(logFile), 0o644); err != nil {
|
||||
// log disabled
|
||||
return nil, nil
|
||||
return func() error { return nil }, nil
|
||||
}
|
||||
f, err := os.OpenFile(logFile, os.O_WRONLY|os.O_CREATE|os.O_APPEND, 0o644)
|
||||
if err != nil {
|
||||
// log disabled
|
||||
return nil, nil
|
||||
return func() error { return nil }, nil
|
||||
}
|
||||
log.SetOutput(f)
|
||||
log.SetLevel(log.DebugLevel)
|
||||
|
|
Loading…
Reference in a new issue