Skip to content

Default formatter doesn't return context by default. #207

@todd-a-jacobs

Description

@todd-a-jacobs

Environment

  • Any Ruby
  • semantic_logger 4.10.0

Expected Behavior

The default formatter and its descendants should support context by default.

Actual Behavior

There is no element for context in the return value from the default formatter. It has to be added as a separate element in a custom formatter, in the form of log.context because it's not being passed in by default.

Pull Request

I'm unsure if this is intentional or not. It's easy enough to add log.formatter to the returned array of elements from the default formatter, but there may be a better way to handle it, or a good reason it isn't available 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