logger formats & problems

For questions and discussion that is NOT (I repeat NOT) specific to a certain Operating System.
markfilipak
Blank Cone
Blank Cone
Posts: 67
Joined: 13 Jan 2013 00:17
Location: Mansfield, Ohio, U.S.A.

logger formats & problems

Postby markfilipak » 21 Mar 2018 04:13

I REALLY want to help you hard working guys with VLC player debug. But you have to do some fixing to facilitate it.

Overall suggestion: Instead of letting the threads all write to a single log file, create 4 log files: 'vlc_info.log', 'vlc_error.log', 'vlc_warning.log', and 'vlc_debug.log'. And please, please add timestamps to each line. I can interleave the lines of the 4 log files as needed,

Or, let each module have its own log file,

Or, let each thread have its own log file -- whichever is easiest. But having the log as a mash of lines is making the job of figuring out what's happening in the program unnecessarily difficult.

I would do better with multiple, dedicated log files (and I think you would, too).

About log levels:
With logger set to "info", the log file (5,896 bytes, captured and renamed 'VLC log info.log') included "error" lines...(?)
With logger set to "error", the log file (11,450 bytes, captured and renamed 'VLC log error.log') included "warning" lines...(?)
With logger set to "warning", the log file (19,731,425 bytes, captured and renamed 'VLC log warning.log') included "debug" lines...(?)
With logger set to "debug", the log file (19,583,017 bytes, captured and renamed 'VLC log debug.log') included more "debug" lines.

Now, one would expect the "debug" log file to be the most verbose, and hense, the largest. That would probably be the case above, too, but I had to make them in 4 separate runs, so the "debug" log is not the largest.

As I compare file pairs using a side-by-side text-comparison tool, I see that identical events are recorded but in different order. That tells me that several threads are writing to the log file simultaneously.

I tested logging while playing the 1st, 2 minutes of "The Counselor" (UPC 024543406198 01), theatrical version (disc 1). My objective was to figure out what the 4 log levels include. I was surprised to see error lines in info, warning lines in error, and debug lines in warning.

Rémi Denis-Courmont
Developer
Developer
Posts: 15314
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: logger formats & problems

Postby Rémi Denis-Courmont » 22 Mar 2018 05:10

You can write your own log back-end if you want. But realistically, splitting logs by priority and/or by thread will make following the flow more difficult rather than easier.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

markfilipak
Blank Cone
Blank Cone
Posts: 67
Joined: 13 Jan 2013 00:17
Location: Mansfield, Ohio, U.S.A.

Re: logger formats & problems

Postby markfilipak » 22 Mar 2018 15:41

I thinking about performance. If each thread had its own log, perhaps deadlocks would be avoided. And if the log entries had timestamps, then they could be combined at the end. All gain, no pain.


Return to “General VLC media player Troubleshooting”

Who is online

Users browsing this forum: No registered users and 114 guests