Skip to content

Setting log level for topics with spaces does not work #192

@jakubgs

Description

@jakubgs

Describe the bug
When attempting to reduce noise from topics with spaces in the name like libp2p gossipsub the settings like this:

log-level = "debug;info:libp2p gossipsub,libp2p identify,libp2p pubsub,libp2p pubsubpeer,libp2p switch"

Results in warnings about log format option parsing:

WRN 2026-02-02 13:48:37.003+00:00 Unrecognized logging topic                 topic="libp2p gossipsub"
WRN 2026-02-02 13:48:37.003+00:00 Unrecognized logging topic                 topic="libp2p pubsub"
WRN 2026-02-02 13:48:37.003+00:00 Unrecognized logging topic                 topic="libp2p identify"
WRN 2026-02-02 13:48:37.003+00:00 Unrecognized logging topic                 topic="libp2p dialer"
WRN 2026-02-02 13:48:37.003+00:00 Unrecognized logging topic                 topic="libp2p switch"

Surprisingly, through trial and error it was discovered that removing the libp2p prefix works:

log-level = "debug;info:dialer,gossipsub,identify,libp2p,pubsub,pubsubpeer,switch"

Which looks like a bug, at least in the sense that someone might want to silence libp2p dialer but not xyz dialer, but the above setting might affect both.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions