[Solved]Some myth messages going to syslog (v33)

Have a MythTV related problem? Ask for help from other MythTV users here.

Moderator: Forum Moderators

Post Reply
white_haired_uncle
Senior
Posts: 244
Joined: Thu Feb 23, 2023 8:55 pm
Location: Safe outside my gilded cage
United States of America

[Solved]Some myth messages going to syslog (v33)

Post by white_haired_uncle »

I noticed some mythfrontend messages in syslog, while most go to mythfrontend.log.

All of the messages in syslog look like this (note: "mythfrontend: message repeated")

Code: Select all

Mar 23 23:59:26 wolverine mythfrontend: message repeated 2 times: [ mythfrontend[27362]: I ImageLoad mythcommandlineparser.cpp:2922 (operator()) Qt: libpng warning: iCCP: known incorrect sRGB profile]
Mar 23 23:59:29 wolverine mythfrontend: message repeated 3 times: [ mythfrontend[27362]: I CoreContext mythdeinterlacer.cpp:161 (Filter) MythDeint: Deinterlacer change: 720x480 YUV420P dr:1 tff:1 -> 720x480 YUV420P dr:1 tff:1]
While all messages in mythfrontend.log look like this (note: "mythfrontend: mythfrontend")

Code: Select all

Mar 23 23:59:26 wolverine mythfrontend: mythfrontend[27362]: I CoreContext mythdeinterlacer.cpp:161 (Filter) MythDeint: Deinterlacer change: 0x0 None dr:0 tff:1 -> 720x480 YUV420P dr:1 tff:1
Mar 23 23:59:26 wolverine mythfrontend: mythfrontend[27362]: I CoreContext mythopenglvideo.cpp:477 (SetupFrameFormat) GLVid: New frame format: None:None 720x480 (Tex: 2D) -> YUV420P:YUV420P 720x480 (Tex: 2D)
I don't know rsyslog, but I think that may make sense. Looks to me like $msg sometimes starts with "message repeated", not "mythfrontend".

Code: Select all

wolverine# grep mythfrontend /etc/rsyslog.d/40-mythtv.conf 
if $msg startswith ' mythfrontend' then /var/log/mythtv/mythfrontend.log
Should this be

Code: Select all

wolverine# grep mythfrontend /etc/rsyslog.d/40-mythtv.conf 
if $programname startswith 'mythfrontend' then /var/log/mythtv/mythfrontend.log
P.S. it appears /etc/rsyslog.d/40-mythtv.conf was installed by mythtv-common. I recently complied and installed (admittedly, without uninstalling the myth packages), and that file was not overwritten. This makes me wonder if that file would is installed if you build from source, and if not if it should be.
User avatar
bill6502
Developer
Posts: 2299
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: Some myth messages going to syslog (v33)

Post by bill6502 »

40-mythtv.conf isn't part of the MythTV code base. It's left over from the package as you suggested.

If building from source, then you don't have to worry about a package overwriting any changes you
make, so go ahead. The type of logging (syslog, journal) are probably set in the mythtv-backend.service
file. I suspect, but haven't tested, that the duplicate program names come from rsyslog adding it's own
to one that the front/backend puts in the message.
white_haired_uncle
Senior
Posts: 244
Joined: Thu Feb 23, 2023 8:55 pm
Location: Safe outside my gilded cage
United States of America

Re: Some myth messages going to syslog (v33)

Post by white_haired_uncle »

If I'm reading this right (Available Properties in man rsyslog.conf on ubuntu), the duplicate program names are not really duplicates. Most messages look like this:

Code: Select all

Mar 23 23:59:26 wolverine mythfrontend: mythfrontend[27362]: 

where "mythfrontend:" is the $programname supplied by syslog, and "mythfrontend[27362]" is the beginning of the $msg portion supplied by myth. 40-mythtv.conf looks at the start of $msg, assuming myth always sends the program name as the first word of the message and directs the message to the proper log.

However, it looks like if myth sends the same message repeatedly, syslog changes the $msg portion to something like

Code: Select all

message repeated 2 times: [ mythfrontend[27362]:
Therefore, filtering by $msg will not always work, and filtering by $programname would be a better choice. I'm testing that now.

Now that I think of it, I'm probably raising the issue in the wrong place if the ubuntu packages are maintained by someone else
white_haired_uncle
Senior
Posts: 244
Joined: Thu Feb 23, 2023 8:55 pm
Location: Safe outside my gilded cage
United States of America

Re: Some myth messages going to syslog (v33)

Post by white_haired_uncle »

Updated /etc/rsyslog.d/40-mythtv.conf on frontend and backend to use $programname instead of @msg. All messages are now going where they are supposed to (when $msg starts with "message repeated", it ends up in the proper myth log, not syslog).
Post Reply