Remove mid from journal.py - #38
Conversation
|
|
||
| @staticmethod | ||
| def mapPriority(levelno): | ||
| def map_priority(levelno): |
There was a problem hiding this comment.
Yes, I agree that map_priority is a much better name. This part of the code is very old, it even predates the time when python-systemd was in the systemd repo. Hence the style that is a bit strange.
But I think we must keep backwards compatibility here. Can you add mapPriority = map_priority or something like that?
|
Changed to only be the removal of |
|
Moved the style fixes and your request for |
|
@keszybz rebased on master to fix conflicts |
|
The idea was that you can set MESSAGE_ID either on the handler (in which case it lands in The issue with current code is that if both are specified, we get an error, because MESSAGE_ID would be specified twice. So this should be fixed, but I think the ability to specify MESSAGE_ID on the message should be retained. If both are present, the one from the message should have higher priority, and the one from the handler should be ignored. |
|
If I am understanding correctly, setting it on each individual message is still possible. Is this an example of setting it on the individual message: and this sets a field for the entire handler: If these assumptions are what you are referring to, then this patch will still allow for this. |
|
Ah, I pushed the wrong branch and github closed the PR. I'll submit a replacement PR. |
Removed
midvariable fromJournalHandlersince theMESSAGE_IDis alreadyin the
extrasvariable.MESSAGE_IDwas being set toNone, but this won'tappear in the logs.