swfsm icon indicating copy to clipboard operation
swfsm copied to clipboard

Feature request: Allow users to change log levels and configure logging formats

Open ryanwalls opened this issue 9 years ago • 1 comments

Currently the logging is relatively verbose, which is good, but it would be nice to make it configurable. We always use this logging library for our projects: https://github.com/inconshreveable/log15. For libraries that we create we just set the default Logger to be a "discard" logger. Then the client of the library can decide how they want to configure logging.

This would also let you reduce a lot of repeated code as you can create child loggers that have the same context as their parent.

EDIT: Looks like you've made it configurable with logrus libraries. But it would still be nice to use discrete levels for logging. And personally, I much prefer https://github.com/inconshreveable/log15 to logrus.

Thoughts?

I could work on a PR and you could see what you think.

ryanwalls avatar Apr 13 '16 19:04 ryanwalls

Sounds fine, as long as the log levels dont necessarily appear in all the log lines.

We would also need to have some guidelines for determining what is debug/info/error etc.

sclasen avatar Apr 14 '16 15:04 sclasen