Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

journald: Map "info" level to journald "info" priority #2661

Closed
wants to merge 1 commit into from

Conversation

hongquan
Copy link

Motivation

In the current implementation, "info" level is mapped to Journald "notice" priority. This mapping is not reasonable, because, according to https://en.wikipedia.org/wiki/Syslog#Severity_level:

notice: Conditions that are not error conditions, but that may require special handling

and in reality, journactl displays "notice" message as bold text, in constrast to normal style of "info".
So this PR is to remap "info" tracing level to Journald "info" priority.

Solution

Remap:

info => info
debug | tracing => debug.

@hongquan hongquan requested review from hawkw, davidbarsky and a team as code owners July 22, 2023 02:10
@hongquan
Copy link
Author

hongquan commented Aug 3, 2023

@hawkw Could you take a look?

@glts
Copy link

glts commented Aug 7, 2023

Noting in passing that there is also pull request #2347, which would make the mapping freely configurable.

@hawkw
Copy link
Member

hawkw commented Aug 8, 2023

I would prefer to merge #2347, which (as @glts pointed out) is a more flexible solution. If the original contributor of that change doesn't have the opportunity to address the last feedback I left, I'm willing to go ahead and merge that PR as-is.

@Ralith
Copy link
Collaborator

Ralith commented Dec 7, 2023

Closing as we'd rather make this configurable. I do think our current behavior is the correct default: it retains distinctions between all tracing levels, and it's reasonable for debug! messages to be unremarkable whereas info! might have special significance.

@Ralith Ralith closed this Dec 7, 2023
hawkw pushed a commit that referenced this pull request Jan 11, 2024
This allows to manually map tracing levels to journald levels.

It seems that @little-dude, who started the original PR, doesn't have
time to finish this, so I picked it up.  Reapplied the changes to the
newest master branch and fixed the latest comments/issues.

This will also fix/close:

Closes #2649
Closes #2661
Closes #2347 (the original pr)
hds pushed a commit that referenced this pull request Nov 19, 2024
This allows to manually map tracing levels to journald levels.

It seems that @little-dude, who started the original PR, doesn't have
time to finish this, so I picked it up.  Reapplied the changes to the
newest master branch and fixed the latest comments/issues.

This will also fix/close:

Closes #2649
Closes #2661
Closes #2347 (the original pr)
hds pushed a commit that referenced this pull request Nov 20, 2024
This allows to manually map tracing levels to journald levels.

It seems that @little-dude, who started the original PR, doesn't have
time to finish this, so I picked it up.  Reapplied the changes to the
newest master branch and fixed the latest comments/issues.

This will also fix/close:

Closes #2649
Closes #2661
Closes #2347 (the original pr)
hds pushed a commit that referenced this pull request Nov 20, 2024
This allows to manually map tracing levels to journald levels.

It seems that @little-dude, who started the original PR, doesn't have
time to finish this, so I picked it up.  Reapplied the changes to the
newest master branch and fixed the latest comments/issues.

This will also fix/close:

Closes #2649
Closes #2661
Closes #2347 (the original pr)
hds pushed a commit that referenced this pull request Nov 20, 2024
This allows to manually map tracing levels to journald levels.

It seems that @little-dude, who started the original PR, doesn't have
time to finish this, so I picked it up.  Reapplied the changes to the
newest master branch and fixed the latest comments/issues.

This will also fix/close:

Closes #2649
Closes #2661
Closes #2347 (the original pr)
hds pushed a commit that referenced this pull request Nov 21, 2024
This allows to manually map tracing levels to journald levels.

It seems that @little-dude, who started the original PR, doesn't have
time to finish this, so I picked it up.  Reapplied the changes to the
newest master branch and fixed the latest comments/issues.

This will also fix/close:

Closes #2649
Closes #2661
Closes #2347 (the original pr)
hds pushed a commit that referenced this pull request Nov 22, 2024
This allows to manually map tracing levels to journald levels.

It seems that @little-dude, who started the original PR, doesn't have
time to finish this, so I picked it up.  Reapplied the changes to the
newest master branch and fixed the latest comments/issues.

This will also fix/close:

Closes #2649
Closes #2661
Closes #2347 (the original pr)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants