Unify logging and add log level
Currently we only use log.Println
with a manual prefix "WARN", "ERROR". Suggestions:
- go through the code and unify the error handling
- goal: not only print
err
variable, give a bit more context - where does it makes sense to print/catch error
- sometimes we don't handle errors
- goal: not only print
- Add log level support
- Where to set log level: command line argument or environment variable?
- maybe: change filename (currently on Linux ~/.config/leap/systray.log)