gls icon indicating copy to clipboard operation
gls copied to clipboard

Littering with `gls.log`

Open yigitsever opened this issue 2 years ago • 2 comments

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?

yigitsever avatar Oct 08 '22 17:10 yigitsever

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 avatar Oct 09 '22 14:10 ozansz

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

ozansz avatar Oct 09 '22 14:10 ozansz