Posting Logs

From MythTV Official Wiki
Revision as of 22:07, 2 December 2012 by Llib (talk | contribs) (HOWTO for posting log files)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Frequently, when attempting to resolve a problem, users will be asked for logfiles. Uploading the logs and suppling the address is a good way to provide that data when using a mailing list or on IRC.

Quick start

pastebinit <logfileName>

That simple command returns:

http://paste.ubuntu.com/1405788/

which can be cut and pasted to the #mythtv-users IRC channel or to a response on the mythtv-users mailing list.

It would be wise to check the size of a logfile before doing this. If the file has days/months of data in it, edit the file. Go to the end and search backwards for a string that looks similar to this.

mythbackend version: master [v0.27-pre2-278-g3eef99e]

and chop off everything above it.


Important.png Note: This method is not to be used when posting logfiles for trouble tickets in Trac. Use its Attach file button to logs and --version output.


Where are the logfiles stored?

This depends on the distribution and or personal configurations. Typical locations are /var/log/syslog and files under /var/log/mythtv. If necessary, typing ps ax | grep mythProgramName | grep -v grep will display the options used by a running MythTV program. Most likely that will be mythbackend. See Logging for more detail.

If running a command manually, the logfile can be placed in /tmp. For example: mythshutdown --lock -v general --loglevel info --logpath /tmp.

Why bother?

Providing an entire logfile gives the person attempting to diagnose a problem the MythTV version information. It also provides events leading up to an error. Also, be it a terminal, email client or some pastebins, long lines from logfiles frequently get folded. Which is easier to read, this:

2012-12-02 08:56:09.859586 C [3008/3008] thread_unknown mythcommandlineparser.cpp:
2545 (ConfigureLogging) - mythbackend version: master [v0.27-pre2-278-g3eef99e-dirty]
www.mythtv.org
2012-12-02 08:56:09.859608 C [3008/3008] thread_unknown mythcommandlineparser.cpp:2547
 (ConfigureLogging) - Qt version: compile: 4.8.1, runtime: 4.8.1
2012-12-02 08:56:09.859613 N [3008/3008] thread_unknown mythcommandlineparser.cpp:2549
 (ConfigureLogging) - Enabled verbose msgs:  general
2012-12-02 08:56:09.859699 N [3008/3008] thread_unknown logging.cpp:852 (logStart) -
Setting Log Level to LOG_INFO
2012-12-02 08:56:09.860504 I [3008/3008] thread_unknown signalhandling.cpp:194
(SetHandlerPrivate) - Setup Interrupt handler
2012-12-02 08:56:09.860514 I [3008/3008] thread_unknown signalhandling.cpp:194
(SetHandlerPrivate) - Setup Terminated handler
2012-12-02 08:56:09.860522 I [3008/3008] thread_unknown signalhandling.cpp:194
 (SetHandlerPrivate) - Setup Segmentation fault handler
2012-12-02 08:56:09.860529 I [3008/3008] thread_unknown signalhandling.cpp:194
(SetHandlerPrivate) - Setup Aborted handler
2012-12-02 08:56:09.860536 I [3008/3008] thread_unknown signalhandling.cpp:194
(SetHandlerPrivate) - Setup Bus error handler
2012-12-02 08:56:09.860543 I [3008/3008] thread_unknown signalhandling.cpp:194
(SetHandlerPrivate) - Setup Floating point exception handler
...

or this:

2012-12-02 08:56:09.859586 C [3008/3008] thread_unknown mythcommandlineparser.cpp:2545 (ConfigureLogging) - mythbackend version: master [v0.27-pre2-278-g3eef99e-dirty] www.mythtv.org
2012-12-02 08:56:09.859608 C [3008/3008] thread_unknown mythcommandlineparser.cpp:2547 (ConfigureLogging) - Qt version: compile: 4.8.1, runtime: 4.8.1
2012-12-02 08:56:09.859613 N [3008/3008] thread_unknown mythcommandlineparser.cpp:2549 (ConfigureLogging) - Enabled verbose msgs:  general
2012-12-02 08:56:09.859699 N [3008/3008] thread_unknown logging.cpp:852 (logStart) - Setting Log Level to LOG_INFO
2012-12-02 08:56:09.860504 I [3008/3008] thread_unknown signalhandling.cpp:194 (SetHandlerPrivate) - Setup Interrupt handler
2012-12-02 08:56:09.860514 I [3008/3008] thread_unknown signalhandling.cpp:194 (SetHandlerPrivate) - Setup Terminated handler
2012-12-02 08:56:09.860522 I [3008/3008] thread_unknown signalhandling.cpp:194 (SetHandlerPrivate) - Setup Segmentation fault handler
2012-12-02 08:56:09.860529 I [3008/3008] thread_unknown signalhandling.cpp:194 (SetHandlerPrivate) - Setup Aborted handler
2012-12-02 08:56:09.860536 I [3008/3008] thread_unknown signalhandling.cpp:194 (SetHandlerPrivate) - Setup Bus error handler
2012-12-02 08:56:09.860543 I [3008/3008] thread_unknown signalhandling.cpp:194 (SetHandlerPrivate) - Setup Floating point exception handler
...

What if pastbinit isn't on a system?

If the program doesn't exist, it will be necessary to use the distributions package manager to get a copy. Readers are encouraged to update this Wiki with their distribution's method.

For *buntu:

sudo apt-get install pastebinit

A quick note on customization

By adding a file like this, users can save their pastebinit preferences:

Script.png ~/.pastebinit.xml

<pastebinit>
    <pastebin>http://paste.ubuntu.com</pastebin>
    <author>theNameUsedInThePost</author>
    <format>text</format>
</pastebinit>