Bug 4293 - Move to using Log::Log4perl to replace --d_* debugging.
: Move to using Log::Log4perl to replace --d_* debugging.
Status: CLOSED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: Misc
: 7.0
: All All
: P1 blocker (vote)
: ---
Assigned To: Dan Sully
:
Depends on: 3267 4112
Blocks:
  Show dependency treegraph
 
Reported: 2006-10-04 15:53 UTC by Dan Sully
Modified: 2008-12-18 11:12 UTC (History)
3 users (show)

See Also:
Category: ---


Attachments
Work in progress debugging settings page. (59.35 KB, image/png)
2006-10-16 08:35 UTC, Dan Sully
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dan Sully 2006-10-04 15:53:47 UTC
Features:

* Class based logging, with callers & line numbers.

* Persistent debugging settings via config file.

* Logging to a file with rotation is easy.

ToDo:

* Need to rework Setup (bug 3267) to allow full use of flags via the Settings API.

* Plugins need to be able to specify a namespace and config. See also bug 4112
Comment 1 Jim McAtee 2006-10-05 19:41:15 UTC
I've seen instances with the scanner and SlimServer processes where one somehow overwrites lines that the other had written to the file.  Perhaps it's only a Windows issue, but would it be better/safer to have the processes logging to separate log files?
Comment 2 Dan Sully 2006-10-05 20:29:27 UTC
Log::Log4perl has a synchronization class.

http://search.cpan.org/~mschilli/Log-Log4perl/lib/Log/Log4perl/Appender/Synchronized.pm
Comment 3 Ceejay 2006-10-16 00:22:44 UTC
If you are reworking this areas could I suggest a "wouldn't it be nice if..."?

One thing that throws a lot of people at the moment is that long list of debug flags - how the heck do you know which ones to turn on?  If you put too many on, you can really drown in data.  So some clues would be helpful - could be just a one liner for each one.  Probably not on the screen all the time - it would be too cluttered - but at least available as an option / link / help page.

Thanks
Comment 4 Dan Sully 2006-10-16 08:35:03 UTC
Created attachment 1647 [details]
Work in progress debugging settings page.
Comment 5 Dan Sully 2006-10-16 08:35:37 UTC
ceejay - check out the attached image.
Comment 6 Ceejay 2006-10-16 13:36:13 UTC
Yep, thats pretty good. I especially like the way you've highlighted the links to the log files (instead of that well hidden "here" link in current!)

Would there be a "Change" button to go somewhere?

The only issue with this layout that I can think of is that by giving a longer description for each one you've made it harder to quickly specify one of the flags. So if you are trying to help someone debug a problem then you'd have to say "turn on 'All player protocol debugging'" instead of "turn on d_protocol" which is shorter and unambiguous.  

I know I'm trying to have it both ways, but could you give both the short name and the description?

Presuming that you are also keeping the command line options, it would also make it easier to relate the command-line option with ticking boxes here.
Comment 7 Dan Sully 2006-10-16 13:38:09 UTC
The change button is at the bottom of the page.

The command line options will be changing. The old --d_foo stuff will be going away.

I agree, I'd like to have the actual flags there, but I'm not sure what the best way to lay that out is.
Comment 8 Jim McAtee 2006-10-16 13:50:11 UTC
That looks good.  You'll want to sort the drop downs in order by level of verbosity, so the differences are obvious to the user, perhaps with a more complete explanation for the levels.  More verbose 'Help' for each debugging setting would be good, but I'd assume that will be made possible once you've implemented the changes you're working on for setup in 7.0.

Will there need to be a checkbox to enable/disable debugging, or will debugging at some level always be enabled in the future?

Will there be some means of enabling/changing debugging options when the server is stopped? Perhaps by directly editing the prefs file?  If so, I'd consider keeping a debugging.txt file handy that explains the debugging options and levels, specifically so users can enable debugging for startup problems when they'll be unable to get into the web ui.
Comment 9 Dan Sully 2006-10-21 17:36:23 UTC
Added in change 10437

Any further changes / requests should open a new bug.
Comment 10 Chris Owens 2008-03-07 09:04:05 UTC
This bug is being closed since it was resolved for a version which is now released!  Please download the new version of SqueezeCenter (formerly SlimServer) at http://www.slimdevices.com/su_downloads.html

If you are still seeing this bug, please re-open it and we will consider it for a future release.