The logging currently in WILL has some rather major issues that are not easily solved without completely rewriting the system.
Here are a few examples:
File handles are not currently being closed
A new file handle into the same file is being created for every module that creates a Log instance. This can lead to data loss (it almost certainly is already).
It's not thread safe, and we are using some threading in our app. This is going to lead to data loss.
We're writing everything out to stdout where it should be going to stderr.
The solution to this of course is to use the built in logging solution in Python. All of these problems are already solved. This branch transitions WILL to use the built in logging module in Python. I've even retained most of the console buffer coloring, though it has been modified.
There are five run levels for logging now instead of the eight or nine we had before. In order they are: debug (green), info (white), warning (yellow), error (red) and critical (red). Please note, "error" is for recoverable errors, "critical" is reserved for situations in which WILL needs to shut down.
Additionally, there is some more data needed in the config file. Please see "example_config.json" for more info.
The logging currently in WILL has some rather major issues that are not easily solved without completely rewriting the system.
Here are a few examples:
The solution to this of course is to use the built in logging solution in Python. All of these problems are already solved. This branch transitions WILL to use the built in logging module in Python. I've even retained most of the console buffer coloring, though it has been modified.
There are five run levels for logging now instead of the eight or nine we had before. In order they are: debug (green), info (white), warning (yellow), error (red) and critical (red). Please note, "error" is for recoverable errors, "critical" is reserved for situations in which WILL needs to shut down.
Additionally, there is some more data needed in the config file. Please see "example_config.json" for more info.