Closed tebben closed 7 years ago
LGTM
also a good opportunity to think about a logging policy. What do we want to log per level?
Hello @tebben and @bertt ,
I have started looking into this issue. Just started with basic scaffolding for the logger. I will create a pull request once I have propagated the changes across the existing code.
You can checkout the progress here - https://github.com/thezelus/gost-server/tree/feature/logging
Feel free to let me know if you want something changed.
Changed default log level to info instead of warn when verbose is set to false. Changed default settings in settings.yaml: 'verbose' to false and filename to none so the default logging is set to stdout
Logging policy debug - Detailed information on the flow through the system. info - Interesting runtime events (startup/shutdown). Be conservative and keep to a minimum. warn - Use of deprecated APIs, poor use of API, other runtime situations that are undesirable or unexpected, but not necessarily "wrong". error - Other runtime errors or unexpected conditions. fatal - Unable to proceed, shutdown system
Currently were using the rather simple default logger, I suggest we start using https://github.com/sirupsen/logrus
pros:
@bertt Do you agree with using logrus or do you have other suggestions?