Page 1 of 1

Disable SABnzbd.exe.log

Posted: January 3rd, 2010, 9:30 am
by sablog
Hi,

I'm running SABnzbd 0.4.12 as a service on Windows XP on a write protected EWF volume.
SABnzbd creates a logfile SABnzdb.exe.log
I would like to disable this logfile

Does anybody know how it's possible ? (if it is..)


Roel

Re: Disable SABnzbd.exe.log

Posted: January 3rd, 2010, 11:08 am
by Eejit

Re: Disable SABnzbd.exe.log

Posted: January 3rd, 2010, 3:34 pm
by shypike
The SABnzbd binaries will only create a SABnzdb.exe.log if there is an internal crash.
Please allow SABnzbd to write this file and look inside it.
You may have stumbled on a serious issue.

Re: Disable SABnzbd.exe.log

Posted: January 4th, 2010, 1:05 pm
by sablog
Ok, thats clear.

It somehow stopped logging to this file.

But where can I find information about analyzing this SABnzbd.exe.log file ?

I've a lot of these entries :

Traceback (most recent call last):
  File "logging\handlers.pyo", line 73, in emit
  File "logging\handlers.pyo", line 147, in shouldRollover
ValueError: I/O operation on closed file


Is it possible that the other logfiles (from normal sabnzbd logging) were full or corrupt ?
It stopped when i disabled logging in sabnzbd.ini

By the way , writing on an EWF volume is possible , but in my setup writes are 'cached' in ram.
I've placed al other configurable directories to a normal writable volume.
Only sabnzbd executable, ini and other related files are on EWF.
It's running very fine and stable.

Re: Disable SABnzbd.exe.log

Posted: January 5th, 2010, 3:00 am
by shypike
From the ISSUES.txt file in the SABnzbd package:
Sometimes logging stops. This is a notorious bug in Python logging. SABnzbd will
function as normal. If you run from sources or use the --console option with the
Win32-binary, you will see that logging continues in the console window, but
nothing will be written to the log-files.
A side effect is that the complaints about failed logging are written to the exe.log file.
There's nothing we can do about it.
The Python language designers claim that it only happens when the
application contains an error. Many programmers complain that it's
a Python language problem.

Re: Disable SABnzbd.exe.log

Posted: January 13th, 2010, 5:56 pm
by ncjok
Sorry if this has already been discussed; this is the only mention of "sabnzbd.exe.log" I found via a search.

Running 0.5.0Beta6 on Win7-64, I have found a sizeable sabnzbd.exe.log file in the program installation directory which continues to be filled with with error entries matching those posted by sablog, above. With his mention of disabling logging, I had a nozy in the INI file. Specifically, the max_log_size variable caught my eye; earlier I had noticed that sabnzbd.log had frozen at 5120 KB in the middle of a transfer which was only a few hours old.

The max_log_size value of 5242880 bytes clearly prevents the sabnzbd.log file from being further appended to, affording the program error which generates the sabnzbd.exe.log entries.

I did not notice any logging options in the web interface and the wiki doesn't seem to hold any references.

Code: Select all

[logging]
max_log_size = 5242880
log_level = 1
log_backups = 5
enable_cherrypy_logging = 0
Could I please have an explanation of the latter three variables? Perhaps a run down of the entire INI file could be posted to the wiki.

I think for now I will just disable logging completely unless there is some important information I might miss? How does the program cope with the growth of the log file? Delete after successful transfer? Delete after certain age? Begin new file after reaching a specified size limit?

By the way I am impressed with the program in general. Thank you for making it free.

Re: Disable SABnzbd.exe.log

Posted: January 13th, 2010, 6:04 pm
by shypike
The logging system rolls over.
With the standard settings it creates a maximum of
5 files occupying the specified space. The files are rotated.
The most recent one is always called sabnzbd.log.
I can confirm that it works.

The exe.log that you see is the panicking of the logging system itself.
I wouldn't be surprised if there is a bug in the Python logging system.
More people claim that, but the Python people keep denying it.

Normally you don't need logging at all, especially not
on "debug" level. Just set it to Warnings/Errors.
It's only there for our convenience.

Re: Disable SABnzbd.exe.log

Posted: January 13th, 2010, 6:24 pm
by ncjok
I have only one log file of size 5242880 in %userprofile%\AppData\Local\sabnzbd\ so I presume that this first file was filled and then the logging system fell over at the point of rolling over to the second file?

Further review of the wiki garnered the command line options:

Code: Select all

-l 	--logging 	0 = Only show errors and warnings
		         1 = Also show info messages
		         2 = Also show debug messages (use only when analyzing problems)
Are these options effectively mirrored in the INI file, thus I can set log_level = 0 to show warnings/errors as you suggested?

Re: Disable SABnzbd.exe.log

Posted: January 14th, 2010, 3:23 am
by shypike
Like I said there may be a bug in Python's logging system
and a likely place is the moment of rotation.
The logging is part of the programming language's library.

-l0 or --logging 0 will minimize the logging.