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

Get help with all aspects of SABnzbd
Forum rules
Help us help you:
  • Are you using the latest stable version of SABnzbd? Downloads page.
  • Tell us what system you run SABnzbd on.
  • Adhere to the forum rules.
  • Do you experience problems during downloading?
    Check your connection in Status and Interface settings window.
    Use Test Server in Config > Servers.
    We will probably ask you to do a test using only basic settings.
  • Do you experience problems during repair or unpacking?
    Enable +Debug logging in the Status and Interface settings window and share the relevant parts of the log here using [ code ] sections.
Post Reply
wizzy
Newbie
Newbie
Posts: 3
Joined: May 16th, 2015, 1:18 pm

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

Post 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
User avatar
sander
Release Testers
Release Testers
Posts: 8831
Joined: January 22nd, 2008, 2:22 pm

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

Post 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.
wizzy
Newbie
Newbie
Posts: 3
Joined: May 16th, 2015, 1:18 pm

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

Post 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
User avatar
sander
Release Testers
Release Testers
Posts: 8831
Joined: January 22nd, 2008, 2:22 pm

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

Post 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.
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

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

Post 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.
User avatar
jcfp
Release Testers
Release Testers
Posts: 989
Joined: February 7th, 2008, 12:45 pm

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

Post 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.
wizzy
Newbie
Newbie
Posts: 3
Joined: May 16th, 2015, 1:18 pm

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

Post 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!
Post Reply