Skip to content

Support error parameter from swift-log #239

Description

@samuelmurray

Please summarize your feature request

Error information is not included in logs from ConsoleLogger when using the new overloads in swift-log.

Describe the functionality you're seeking in more detail

Version 1.12.0 of swift-log added a new log methods that allows the caller to pass an error parameter that is propagated to the LogHandler (apple/swift-log#425). It would be great if the LogHandler in this package (ConsoleLogger) used the value (if present) and included it in the final output. A simple serialization involved simply taking the string representation ("\(error)") and the type name (String(reflecting: type(of: error))), but of the implementation is free to choose the exact format.

If you agree with this suggestion, I'd be happy to file a PR with an implementation.

Have you considered any alternatives?

No response

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