Skip to content

Add support for logging levels #211

@peschkaj

Description

@peschkaj

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions