Skip to content

log: Add debug log category prefix #21058

@ghost

Description

I wanted to log (especially incoming) onion connections.
Was unsure if category net or tor would do that.

In the debug log you do not see which debug message is of what category, or if it is of no debug category at all (standard log).

I would like if debug log categories are logged e.g. with a [<debug log category>] prefix.
E.g. for net debug category log line, the line is currently logged like this (I hope I am right that this belongs to netcategory, so this is an example of the uncertainty that results in the current absence of the category logging):
2021-02-01T19:33:08Z SOCKS5 connected zncs3yn6h4l7c3z7.onion

My wish would be that it would be logged like this:

2021-02-01T19:33:08Z [net] SOCKS5 connected zncs3yn6h4l7c3z7.onion

If that would have any drawback like log gets bloated, an option to toggle debug log category prefix logging could be introduced, e.g. debugcategorylogging=<1|0>

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions