Log Viewer

Posted on
Fri Nov 27, 2015 4:24 pm
DVDDave offline
Posts: 329
Joined: Feb 26, 2006
Location: San Jose, CA

Re: Log Viewer

After chugging along fine with the log viewer for over a year, I suddenly began receiving the same "internal server error" discussed earlier in this thread. I'm not sure exactly when it started since I don't remember looking at the log for at least a week or so.

This morning I installed the new Utilities plugin and enabled SQL Logging, so I suspect that might have something to do with the problem. However, I disabled both plugins and discarded today's log in case it had bad characters that were causing an issue. I still get the internal server error though.

Any ideas? Thanks.

--Dave

Posted on
Fri Nov 27, 2015 4:27 pm
DVDDave offline
Posts: 329
Joined: Feb 26, 2006
Location: San Jose, CA

Re: Log Viewer

DVDDave wrote:
After chugging along fine with the log viewer for over a year, I suddenly began receiving the same "internal server error" discussed earlier in this thread. I'm not sure exactly when it started since I don't remember looking at the log for at least a week or so.

This morning I installed the new Utilities plugin and enabled SQL Logging, so I suspect that might have something to do with the problem. However, I disabled both plugins and discarded today's log in case it had bad characters that were causing an issue. I still get the internal server error though.

Any ideas? Thanks.

--Dave

Argh. I deleted the sql files created by the sql logger and the log viewer started working again. I'll go back and retrace my steps to make sure it was not a coincidence. However, I don't understand why one or both of these programs should interfere with the log viewer.

--Dave

Posted on
Sat Jan 23, 2016 10:24 am
DVDDave offline
Posts: 329
Joined: Feb 26, 2006
Location: San Jose, CA

Re: Log Viewer

DVDDave wrote:
...Also, one completely minor problem with the Log Viewer is that the number of days to show the log is off by one; e.g., asking for 3 days only shows 2. I have not looked through this whole thread so my apologies if this has been discussed before. Aside from that, it seems to work perfectly with Indigo 6.

--Dave

I had reported this minor problem a while back. With the latest update, it seems to have gotten worse and now I have to select 4 days to view in order to see one day; i.e., the day selection is now off by 3. Otherwise, it seems to work normally.

Anyone else have this issue? Thanks.

--Dave

Posted on
Fri Feb 26, 2016 8:56 am
rafsel offline
Posts: 27
Joined: Feb 24, 2009

Re: Log Viewer

I am getting this error after running into the "Null byte" issue and therefore cleaning out the log directory and the .sqlite file. It rebuilds the db without errors but then when I try to access the web page I get the error below. Can anyone shed some light on this?
Code: Select all
Feb 26, 2016, 9:55:08 AM
  WebServer                       internal server error "http://192.168.2.107:8176/Eventlog/" from 192.168.2.69
  WebServer                       

Request Headers:
  REFERER: http://192.168.2.107:8176/
  HOST: 192.168.2.107:8176
  CACHE-CONTROL: max-age=0
  ACCEPT: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
  USER-AGENT: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_3) AppleWebKit/601.4.4 (KHTML, like Gecko) Version/9.0.3 Safari/601.4.4
  CONNECTION: keep-alive
  Remote-Addr: 192.168.2.69
  ACCEPT-LANGUAGE: en-us
  DNT: 1
  ACCEPT-ENCODING: gzip, deflate

Traceback (most recent call last):
  File "/Library/Application Support/Perceptive Automation/Indigo 6/IndigoWebServer/cherrypy/_cprequest.py", line 609, in respond
    cherrypy.response.body = self.handler()
  File "/Library/Application Support/Perceptive Automation/Indigo 6/IndigoWebServer/cherrypy/_cpdispatch.py", line 25, in __call__
    return self.callable(*self.args, **self.kwargs)
  File "/Library/Application Support/Perceptive Automation/Indigo 6/IndigoWebServer/plugins/Eventlog/reqhandler.py", line 210, in index
    csv_data, tag_data, dates = _read_indigo_log_file(r'%s' % filename, csv_data, tag_data, dates)
  File "/Library/Application Support/Perceptive Automation/Indigo 6/IndigoWebServer/plugins/Eventlog/reqhandler.py", line 65, in _read_indigo_log_file
    csv_file = csv.reader(open(filename, "rU"), delimiter = '\t')
IOError: [Errno 21] Is a directory

  WebServer                       undefined page requested "http://192.168.2.107:8176/Eventlog/css/global4.css" from 192.168.2.69
  WebServer                       undefined page requested "http://192.168.2.107:8176/Eventlog/css/fonts.css" from 192.168.2.69
  WebServer                       undefined page requested "http://192.168.2.107:8176/Eventlog/css/indigo4.css" from 192.168.2.69

Posted on
Sat Nov 26, 2016 8:19 pm
DVDDave offline
Posts: 329
Joined: Feb 26, 2006
Location: San Jose, CA

Re: Log Viewer

I modified the reqhandler.py file so it would point to the Indigo 7 log file but I'm getting an "internal server error" when I try to view the log with this tool. Any ideas for getting this to work with Indigo 7 logs? Thanks.

--Dave

Posted on
Sun Nov 27, 2016 11:39 am
DVDDave offline
Posts: 329
Joined: Feb 26, 2006
Location: San Jose, CA

Re: Log Viewer

DVDDave wrote:
I modified the reqhandler.py file so it would point to the Indigo 7 log file but I'm getting an "internal server error" when I try to view the log with this tool. Any ideas for getting this to work with Indigo 7 logs? Thanks.

--Dave

I figured it out, and the solution also solved an earlier problem I reported where the number of days returned was wrong. The problem is that the log now includes directories for plugin log entries and the code didn't like this. I changed line 107 to filter the log files for just text files ending in Event:

Code: Select all
         log_files = glob.glob (indigo_path+'/*Events.txt')

This also gets rid of other extraneous files that might be present. However, this means the new plugin log entries don't show up in the table. I imagine code could be added to look in the new directories but this is beyond my skills at the moment.

--Dave

Posted on
Sun Nov 27, 2016 12:30 pm
Different Computers offline
User avatar
Posts: 1838
Joined: Jan 02, 2016
Location: East Coast

Re: Log Viewer

I'm not using this plugin, but lack of wide support for non-ASCII would kill it for me, as my events and modes are full of things like:

(Fyi, this is a screen shot because trying to post these characters threw an SQL error!_
Attachments
Screen Shot 2016-11-27 at 1.30.34 PM.png
Screen Shot 2016-11-27 at 1.30.34 PM.png (32.76 KiB) Viewed 1577 times

SmartThings refugee, so happy to be on Indigo. 10.13.6 on an i5 MBP w/Harmony Hub, Hue, DomoPad, Dynamic URL, Device Extensions, HomeKit Bridge, MatplotLib, Plex, uniFAP, Wunderground, Nanoleaf, LED Simple Effects, Airfoil Pro, Grafana.

Who is online

Users browsing this forum: No registered users and 0 guests