Skip to content

support dynamic severity levels #13

@snqk

Description

@snqk

I was expecting log messages through this handler would respect/translate slog.Level(s) to syslog severity level, but it looks like that's not dynamic today.

All messages are currently written as a static severity level, irrespective of the logging level of that slog.Record.

I think, using a syslog.Writer instead of an io.Writer would enable logging specific slog.Level to a specific syslog severity level. Due to the simplicity of slog.Level I don't think the translation will be complicated to do, but the change in syslog.Writer would be a breaking change.

I'm not sure if the current behaviour was intended or a bug.

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