Posting Logs
m (The url is an example!) |
(Add version and verbose level requirements) |
||
| Line 1: | Line 1: | ||
Frequently, when attempting to resolve a problem, users will be asked | Frequently, when attempting to resolve a problem, users will be asked | ||
| − | for logfiles. | + | for logfiles. Using a pastebin and suppling the returned URL is a good |
way to provide that data when using a mailing list or on IRC. | way to provide that data when using a mailing list or on IRC. | ||
| + | |||
| + | {{Note box|This method is '''not''' to be used when posting logfiles | ||
| + | for trouble tickets in ''Trac''. Use its ''Attach file'' button for logs | ||
| + | and <code>--version</code> output.}} | ||
=== Quick start === | === Quick start === | ||
| Line 22: | Line 26: | ||
</pre> | </pre> | ||
and chop off everything above it. | and chop off everything above it. | ||
| − | + | {{Note box|Be sure that lines with text similar to this are in the log: <code>mythbackend version: master [v0.27-pre2-278-g3eef99e] www.mythtv.org</code> and <code>Enabled verbose msgs:</code>}} | |
| − | {{Note box| | + | |
| − | + | ||
| − | + | ||
=== Where are the logfiles stored? === | === Where are the logfiles stored? === | ||
| Line 93: | Line 94: | ||
</pre> | </pre> | ||
| − | === A | + | === A note on customization === |
By adding a file like this, users can save their | By adding a file like this, users can save their | ||
<code>pastebinit</code> preferences: | <code>pastebinit</code> preferences: | ||
Revision as of 21:50, 3 December 2012
Frequently, when attempting to resolve a problem, users will be asked for logfiles. Using a pastebin and suppling the returned URL is a good way to provide that data when using a mailing list or on IRC.
Note: This method is not to be used when posting logfiles
for trouble tickets in Trac. Use its Attach file button for logs
and --version output.
Contents |
Quick start
pastebinit <logfileName>
The above puts the logfile in a pastebin and returns its URL, such as:
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.
Note: Be sure that lines with text similar to this are in the log: mythbackend version: master [v0.27-pre2-278-g3eef99e] www.mythtv.org and Enabled verbose msgs:
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 note on customization
By adding a file like this, users can save their
pastebinit preferences: