Deluged provide option to log to system logger?

Suggestions and discussion of future versions
Post Reply
funkyflash
New User
New User
Posts: 4
Joined: Sat Jul 11, 2009 12:49 pm

Deluged provide option to log to system logger?

Post 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" :)
johnnyg
Top Bloke
Top Bloke
Posts: 1522
Joined: Sun Oct 28, 2007 4:00 am
Location: Sydney, Australia

Re: Deluged provide option to log to system logger?

Post 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.
funkyflash
New User
New User
Posts: 4
Joined: Sat Jul 11, 2009 12:49 pm

Re: Deluged provide option to log to system logger?

Post 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. :)
johnnyg
Top Bloke
Top Bloke
Posts: 1522
Joined: Sun Oct 28, 2007 4:00 am
Location: Sydney, Australia

Re: Deluged provide option to log to system logger?

Post by johnnyg »

ah nasty.
There's a freespace plugin in trunk, you may want to use that ;)
Post Reply