It would be helpful to add log levels to exceptions so they can be filtered.
I propose adding (these match with the names in use in Microsoft.Extensions.Logging.LogLevel:
- Trace
- Debug
- Info
- Warning
- Error
- Critical
Optionally, we can add None to get things to match perfectly.
The general shape of the solution:
- Extend the
Error class to support logging levels.
- Modify the backing stores to support logging levels.
- Create an extension of
Exception to provide helpers for setting the log level (e.g., myAwfulException.Warning())
- Log exceptions with
Critical by default.
It would be helpful to add log levels to exceptions so they can be filtered.
I propose adding (these match with the names in use in Microsoft.Extensions.Logging.LogLevel:
Optionally, we can add
Noneto get things to match perfectly.The general shape of the solution:
Errorclass to support logging levels.Exceptionto provide helpers for setting the log level (e.g.,myAwfulException.Warning())Criticalby default.