[mythtv-users] ticket 10504 and php-5.4.8-1.fc17.x86_64

Michael T. Dean mtdean at thirdcontact.com
Thu Dec 20 15:58:06 UTC 2012


On 12/20/2012 10:33 AM, Udo van den Heuvel wrote:
> On 2012-12-16 23:52, Michael T. Dean wrote:
>> The default configuration is to log to standard output (and to put a
>> temporary, short-term copy of messages in the DB for easy access--and
>> they get cleaned up automatically).  Anything else is configuration you
>> or those who wrote your start scripts or ... have done.
> The standard output is logged via systemd and is superfluous and
> unexpected because we start it as a daemon, not in the foreground for
> debugging.
> /That/ is the issue.

You /only/ start mythbackend as a daemon when you provide the -d or 
--daemon argument.  If you're providing the -d argument, it is your 
responsibility to also provide appropriate logging arguments, too.  Or, 
if nothing else, when starting mythbackend as a deamon, you'd need to 
redirect stdout/stderr for a poor-man's logging solution or otherwise 
allow the daemon runner to handle stdout/stderr (which, it seems based 
on what you're saying, systemd is doing).

Without -d, mythbackend is started as a foreground application, and, 
therefore, stdout logging makes sense.  MythTV cannot assume any 
sensible logging arguments for daemonized applications (so doesn't have 
different logging behavior due to the use of -d) because file logging 
requires a specified directory (with appropriate permissions to allow 
writing log files there) and syslog logging requires syslog 
configuration (else all the messages get thrown into the "main" syslog 
file and possibly many others in a completely useless fashion which 
would bury useful system logging in the noise of MythTV's logging).  The 
only place where we can be sure logging is allowed is the database--but 
the database logging is for short-term storage (and is automatically 
cleaned up--possibly before you've gotten the useful information from 
the log output), so we don't consider it a replacement for proper file 
or syslog logging.

So, in summary, proper logging requires configuration.  In MythTV 
applications, that configuration is provided the same way as configuring 
daemon mode--through command-line arguments.

Mike


More information about the mythtv-users mailing list