ethanpil / sheret

A tiny, simple static file web server.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Swap `-f` to string type from boolean for custom log location

shadowbq opened this issue · comments

invalid boolean value "'logs\\sheret.log'" for -f: strconv.ParseBool: parsing "'logs\\sheret.log'": invalid syntax

Sheret uses a hard-coded location for log files which is inconvenient for log purposes. It writes the log into the current working directory, not next to executable as described in the readme.md.

I can not write the log to a sane location such as c:\windows\temp or any other location which might be provided by environmental variables.

logfile, err := os.OpenFile("sheret.log", os.O_CREATE|os.O_WRONLY|os.O_APPEND, 0666)

Good point. Thanks for the feedback. Can you submit a PR? Otherwise I will take a look at this and fix over the next few weeks.

If I have time Ill send a pull request

@shadowbq any interest still in the PR?

Thanks for your patience. This has been addressed with the 1.1 release here: https://github.com/ethanpil/sheret/releases/tag/1.1