Page 1 of 1

Fedora - API calls logging to /var/log/messages - systemctl

Posted: May 16th, 2015, 1:23 pm
by wizzy
I recently upgraded to FC21, and set up sabnzbd as a systemctl service. Since then, /var/log/messages has been overwhelmed by sabnzbd logging all API access. Is there a way to stop this logging, either via sabnzbd config, or via the .service file? These are legitimate api calls, I just want the logging to stop.
May 16 14:19:53 localhost SABnzbd: 192.168.xxxx - - [16/May/2015:14:19:53] "GET /api?output=json&mode=queue&limit=5 HTTP/1.1" 200 737 "" "Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.152 Safari/537.36"
May 16 14:20:00 localhost SABnzbd: 192.168.xxxx - - [16/May/2015:14:20:00] "GET /api?output=json&mode=queue&limit=5 HTTP/1.1" 200 738 "" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.152 Safari/537.36"
May 16 14:20:08 localhost SABnzbd: 192.168.xxxx - - [16/May/2015:14:20:08] "GET /api?output=json&mode=queue&limit=5 HTTP/1.1" 200 737 "" "Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.152 Safari/537.36"
Here is the .service file:
[Unit]
Description=SABnzbd
After=network-online.target
Wants=network-online.target

[Service]
Type=simple
ExecStart=/usr/bin/SABnzbd
User=%i

[Install]
WantedBy=multi-user.target

Re: Fedora - API calls logging to /var/log/messages - system

Posted: May 16th, 2015, 3:55 pm
by sander
SABnzbd does not log to /var/log/messages. Only to sabnzbd.log

So it must be some other service/daemon that does that logging.

Re: Fedora - API calls logging to /var/log/messages - system

Posted: May 16th, 2015, 7:43 pm
by wizzy
Looks like it was cherrypy. I disabled cherrypy logging in sabnzbd.ini and no more api calls in /var/log/messages.
enable_cherrypy_logging = 0

Re: Fedora - API calls logging to /var/log/messages - system

Posted: May 17th, 2015, 1:20 am
by sander
Interesting.

On my Ubuntu, I changed the enable_cherrypy_logging = 0 to enable_cherrypy_logging = 1, but I get no logging anywhere in /var/log. I do get a all the cherrypy stuff on STDOUT.

Anyway. Thanks for sharing.

Re: Fedora - API calls logging to /var/log/messages - system

Posted: May 18th, 2015, 1:41 am
by shypike
CherryPy logging goes to the same destination as normal logging: SABnzbd's own logging system.
There are a few issues with it, but I haven't needed it in a long time.
Not since API calls were logged separately.

Re: Fedora - API calls logging to /var/log/messages - system

Posted: May 18th, 2015, 6:53 am
by jcfp
This is a feature of systemd and the .service file in the topic start. With type=simple and sab started without daemonizing the process, systemd logs all console output. Cherrypy's logging (if/when enabled in sab) simply adds to the rest of the program's console output and thus also ends up in the system logs.

Re: Fedora - API calls logging to /var/log/messages - system

Posted: May 18th, 2015, 8:48 am
by wizzy
jcfp wrote:This is a feature of systemd and the .service file in the topic start. With type=simple and sab started without daemonizing the process, systemd logs all console output. Cherrypy's logging (if/when enabled in sab) simply adds to the rest of the program's console output and thus also ends up in the system logs.
Good to know, thanks!