Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Reduce Console Logging messages?
#1
Hi all, 

I have been using SIP for some time, and have been allowing it to run in it's own screen session so that I can take a look at console log messages.   Is there a way to turn off some of the less important console logging messages?   I assume some of these are from the webserver cherrypi, however, I cant find where to limit the verbosity of the messages.  Here is an output of the messages I would like to squelch as they are occurring 100's of times per minute:

[21/May/2017 08:06:53] "HTTP/1.1 GET /rss" - 200 OK
[21/May/2017 08:06:53] "HTTP/1.1 GET /rss" - 200 OK
[21/May/2017 08:06:54] "HTTP/1.1 GET /rss" - 200 OK
[21/May/2017 08:06:54] "HTTP/1.1 GET /rss" - 200 OK
[21/May/2017 08:06:55] "HTTP/1.1 GET /rss" - 200 OK
[21/May/2017 08:06:55] "HTTP/1.1 GET /rss" - 200 OK
[21/May/2017 08:06:56] "HTTP/1.1 GET /rss" - 200 OK
[21/May/2017 08:06:56] "HTTP/1.1 GET /rss" - 200 OK
[21/May/2017 08:06:57] "HTTP/1.1 GET /rss" - 200 OK
[21/May/2017 08:06:57] "HTTP/1.1 GET /rss" - 200 OK
Reply
#2
I don't know of a way to filter the output but SIP does not send any rss GET commands especially 100's of times per minute.

Could there be something else that is sending those?

What do you see if you start SIP from the command line without using screen?
Reply
#3
(2017 May 21, 05:13 PM)dan Wrote: Could there be something else that is sending those?

What do you see if you start SIP from the command line without using screen?

I just did a tcpdump to dig into this a little more.   The use of screen doesnt matter, I get the same messages if just running SIP via command line.   I only do this so that I can get printed messages of when rain was detected, and to give myself some assurance that everything is running ok without doing logging. 

It seems there is some sort of keep-alive that the SIP web interface uses that does a "GET /rss HTTP/1.1" really frequently:

my.window.box.ip.55733 > SIP.IP.http-alt: Flags [P.], cksum 0xd217 (correct), seq 418:836, ack 204, win 255, length 418: HTTP, length: 418
       GET /rss HTTP/1.1
       Host: sip.ip:8080
       Connection: keep-alive
       Accept: */*
       X-Requested-With: XMLHttpRequest
       User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36
       Referer: http://SIP.ip:8080/
       Accept-Encoding: gzip, deflate, sdch
       Accept-Language: en-US,en;q=0.8
       Cookie: webpy_session_id=45645642452e23450281bfc02a6a07a0ef07b

Looks like it's some sort of rainsensor checking from templates/home.html that checks for rainChange every 1000ms:

function rainChange() {
jQuery.get("rss", function(data){
if(priorRs != data) {
priorRs = data;
location.reload(true);
}
})
}

var restarted = 1;

// Initialize behaviors
jQuery(document).ready(function(){
if(useRainsense){
var rainCheck = setInterval(rainChange, 1000);
}
Reply
#4
OK, I see the rss GET requests when the rain sensor is enabled.

Still can't think of a way to filter the console output. SIP does use blinker to send signals when events occur. Perhaps you could use that output to get the info. you need. There are examples of it's use in the signaling_examples.py file in the plugins directory.

It would be easy to add a signal when rain is sensed.


Dan
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)