Skip to content

journald log driver does not support priority prefixes #27040

@tmds

Description

@tmds

I have the following dotnet-demo.container unit:

[Unit]
Description=Example .NET systemd service

[Service]
TimeoutStartSec=900
Restart=always

[Container]
Image=quay.io/tmds/systemd-demo-service:latest
AutoUpdate=registry
Notify=true
LogDriver=journald

[Install]
WantedBy=default.target

The application writes messages to standard output that are prefixed with a journal priority.

The journald logdriver doesn't understand this priority, and the priority appears literally in the log message instead:

{
...
	"PRIORITY" : "6",
...
	"MESSAGE" : "<7>Microsoft.Extensions.Hosting.Internal.Host[2] Hosting started\n",

Comment from @Luap99 (copied from #27038 (comment)):

Mhh looks like that format is described here https://www.freedesktop.org/software/systemd/man/latest/sd-daemon.html

So I guess it would make sense if the journald driver understands that format as well and parse the priority for it.
cc @jnovy @mheon

But that is something that would need to happen in conmon

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions