The previous logging infrastructure had several problems:
- Debugging output was emitted to standard output which is also where the symbolized output would go. Interleaving these two separate bits of information makes inspecting the output difficult and could potentially break tests.
- Enabling debugging output requires modifying the script which is not very conveninent.
- When debugging it isn't immediately obvious where the output is coming from.
This patch uses the Python standard library logging infrastructure
which fixes all of the above problems. Logging is controlled using
two new options.
- --log-level - Sets the logging level, default is
- --log-dest - Set the logging destination, default
is standard error.
Some simple test cases for the feature are included.