Page 1 of 1

Deluged provide option to log to system logger?

Posted: Sun Dec 20, 2009 3:37 pm
by funkyflash
I'd appreciate the option to log to the system logger. I run my deluged on a headless box in a rack that I generally never want to touch, and for that reason I don't much care for home directories for dedicated users. (I've been struggling with getting it to dump it's log in /var/log using the -l option, but that's probably because I'm a n00b and a story for another day.)

Do do so with the shell, one could:

Code: Select all

logger -t deluged -i -- I'm a message!
The -p could also be leveraged to indicate the severity.

Edit: On the other hand, the python logging module could do so as well: http://docs.python.org/library/logging. ... og-handler My brief google search turned this up when I was looking for "deluged syslog" :)

Re: Deluged provide option to log to system logger?

Posted: Sun Dec 20, 2009 4:13 pm
by johnnyg
Deluge currently uses python's logging module so it shouldn't be too hard to add a syslog handler.

More importantly, you should be able to log to /var/log using -l.
At a guess I'd say you've got a permission error.

The way I did it was to create a deluge folder in /var/log/ with the proper write permissions for the user I was running deluged as.
Then I could run deluged with -l /var/log/deluge/daemon.log.

Re: Deluged provide option to log to system logger?

Posted: Mon Dec 21, 2009 5:13 am
by funkyflash
I actually got my /var/log issue figured out. It wasn't /var/log that was the problem at all, my / partition was out of space (I have /var on a different lv). So, it couldn't write to it's state directory, and tanked before it even tried to start logging. :)

Re: Deluged provide option to log to system logger?

Posted: Mon Dec 21, 2009 6:08 am
by johnnyg
ah nasty.
There's a freespace plugin in trunk, you may want to use that ;)