code-base-investigator
code-base-investigator copied to clipboard
Add a custom log formatter class
Makes the following two changes to the log format:
- Use lower-case prefixes to mimic compiler behavior.
- Use ASCII color codes when available.
Related issues
Closes #25.
Proposed changes
- Add a new
Formatterclass that applies the desired formatting to our logs. - Disable colors when writing to file, because ASCII codes don't work there.
- Disable colors when stdout is redirected to a file.
We might want to revisit this much later on if we want to be really fancy (i.e., if we want to do things like allow warning messages to highlight different parts of their own messages, etc) but the difference from just providing a little bit of color is pretty striking: