gost / server

GOST - Go implementation of OGC SensorThings API
MIT License
61 stars 19 forks source link

Logging #123

Closed tebben closed 7 years ago

tebben commented 7 years ago

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?

bertt commented 7 years ago

LGTM

bertt commented 7 years ago

also a good opportunity to think about a logging policy. What do we want to log per level?

thezelus commented 7 years ago

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.

tebben commented 7 years ago

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