Closed tototoshi closed 10 years ago
Verbose mode exists for changing the amount of log rather than the format of log. I think all lines should have a timestamp and hardly anyone wants a log with no timestamp.
The first assertion is true in many cases, and the second may be true as well, but the built-in logger was designed to operate the way it does currently, so for this project, verbose mode also controls the verbosity of individual messages, and as it has support for injected loggers with more standard/expected/flexible functionality, the need to change it is nonexistent. Really, it's highly likely the default logger will eventually be removed altogether anyway.
Thank you for your clarification. I understand.
The logic in here isn't especially clear, but the idea is to only display timestamps in the logs if verbose logging is enabled. Otherwise, timestamps are not included, and only messages which aren't INFO or DEBUG are displayed. This PR makes timestamps display on all logged messages, regardless of the verbosity setting. If this is desirable in your application, feel free to modify your local copy, or better yet, override the class with your implementation and inject your version in place of the generic one that ships with the library. However, it's not likely this will be merged, as the current behavior is the desired one.