ozansz / gls

Minimal file manager with terminal UI #Go
https://sazak.io/gls-file-manager-on-terminal-with-go/
MIT License
68 stars 5 forks source link

Littering with `gls.log` #19

Open yigitsever opened 2 years ago

yigitsever commented 2 years ago

gls leaves behind a gls.log file when run

$ gls -path .
$ file gls.log
gls.log: ASCII text

Maybe the creation of this file should be tied to the -debug option?

ozansz commented 2 years ago

It’s actually where the gls logs are written and it’s created inside cmd/gls.go, and used in log/core.go. It seems I forgot to document it

ozansz commented 2 years ago

Also, log.SetDebug(1) is used inside cmd/gls.go if the -debug is set. We can keep the logging logic, but we can also make the log file a hidden file (such as .gls.log) and document it