Log redirector and filter

Questions and comments specific to a particular plugin should go here.
Mastiff
Experienced User
Posts: 872
Joined: Thu May 03, 2012 10:43 am

Re: Log redirector and filter

Post by Mastiff » Tue Mar 17, 2015 9:21 am

OK, I added a few more of those Nexas, and on the final one it locked up again. There is something that happens, but I have no idea what.

Oh, and would it be possible to make the list wider and perhaps sort it alphabetically instead of by the last one added?

Here's the file log from the last time it happened:

Code: Select all

2015-03-17 10:19:12  EVENT: Tellstick.In|NexaL.Address|19822590|NexaL.Button|5|NexaL.Command|0|Value||
2015-03-17 10:19:14  NOTICE: LogRedirector stopped
2015-03-17 10:20:40     ACTION: NetHomeServer:  "Tellstick"
One thing, though: I still had a modded Logger.py (from Walter) running, so I will need to see if that may have been the problem. I have now reverted to the original.

Edit again: Nope, it still locks up at times when I'm adding the Nexa signals from the RFXtrx that I don't want to see logged by the Tellstick/NetHomeServer.

Edit yet again: It seems like this one is the culprit:

Code: Select all

10:31:25   Tellstick.In|NexaL.Address|292863|NexaL.Button|2|NexaL.Command|0|Value||
All others are hidden from the logger, but I try to add this one, and it seems like something funky happens. This time I even got an error window from Windows with this in:
Problemsignatur:
Navn på problemhendelse: APPCRASH
Programnavn: EventGhost.exe
Programversjon: 0.4.1.1691
Tidsstempel for program: 4918019c
Navn på feilmodul: ntdll.dll
Feilmodulversjon: 6.1.7601.18247
Tidsstempel for feilmodul: 521ea8e7
Unntakskode: c0000005
Unntaksforskyvning: 00042685
OS-versjon: 6.1.7601.2.1.0.256.48
ID for nasjonal innstilling: 1044
Tilleggsinformasjon 1: 0a9e
Tilleggsinformasjon 2: 0a9e372d3b4ad19135b953a78882e789
Tilleggsinformasjon 3: 0a9e
Tilleggsinformasjon 4: 0a9e372d3b4ad19135b953a78882e789

Les vår personvernerklæring på Internett:
http://go.microsoft.com/fwlink/?linkid= ... cid=0x0414

Hvis personvernerklæringen på Internett ikke er tilgjengelig, kan du lese personvernerklæringen frakoblet:
C:\Windows\system32\nb-NO\erofflps.txt

User avatar
Pako
Plugin Developer
Posts: 2294
Joined: Sat Nov 11, 2006 1:31 pm
Location: Czech Republic
Contact:

Re: Log redirector and filter

Post by Pako » Tue Mar 17, 2015 1:43 pm

Mastiff wrote:Edit yet again: It seems like this one is the culprit:

Code: Select all

10:31:25   Tellstick.In|NexaL.Address|292863|NexaL.Button|2|NexaL.Command|0|Value||
I tried it and I have no problem with that.
Are you sure Log.py is the original?

Pako
You know flattr ? You can Image

Mastiff
Experienced User
Posts: 872
Joined: Thu May 03, 2012 10:43 am

Re: Log redirector and filter

Post by Mastiff » Tue Mar 17, 2015 1:46 pm

Yeah, I copied back the one I had named .bak. But it may be because I have so many other plugins, it may crash with one of them.

krambriw
Plugin Developer
Posts: 2570
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

Re: Log redirector and filter

Post by krambriw » Wed Mar 18, 2015 7:48 am

I have dragged and dropped almost all my appearing events to the filter without seeing any problems. Here it works fine, just as expected (and my log is almost empty except for those events of real interest)

Best regards

Mastiff
Experienced User
Posts: 872
Joined: Thu May 03, 2012 10:43 am

Re: Log redirector and filter

Post by Mastiff » Wed Mar 18, 2015 8:00 am

I don't know if it's my collection of plugins. I have these plugins in my startup:

Websocket Suite
RFXtrx
Webserver
EG App Control
Network Event Receiver
Network Event Sender
TCP Events
CLimateDataCalculation
Yamaha RX-V Network Receiver
NetHomeServer
Log redirector and filter

I don't suppose you have all of them, so can the reason be one of the plugins you're not using?

krambriw
Plugin Developer
Posts: 2570
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

Re: Log redirector and filter

Post by krambriw » Wed Mar 18, 2015 9:33 am

If you have the latest version of the Webserver plugin, you should remove Websocket Suite plugin (support for websockets are already built in into the Webserver plugin)

Mastiff
Experienced User
Posts: 872
Joined: Thu May 03, 2012 10:43 am

Re: Log redirector and filter

Post by Mastiff » Wed Mar 18, 2015 9:37 am

Aha,thanks! :) That's always a pain because I have to find out what's using it. I get the message about it being used by actions, and that usually means a long time snooping around to find all the stuff that uses it. Are there any shortcuts to do that?

krambriw
Plugin Developer
Posts: 2570
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

Re: Log redirector and filter

Post by krambriw » Wed Mar 18, 2015 9:44 am

In such case I would open the xml configuration directly in Notepad++ and search & replace

Keep a backup of the original if the modified fails to load, just in case

Mastiff
Experienced User
Posts: 872
Joined: Thu May 03, 2012 10:43 am

Re: Log redirector and filter

Post by Mastiff » Wed Mar 18, 2015 9:48 am

Thanks! I'll try that. :mrgreen:

Mastiff
Experienced User
Posts: 872
Joined: Thu May 03, 2012 10:43 am

Re: Log redirector and filter

Post by Mastiff » Wed Mar 18, 2015 12:27 pm

OK, I'm going slightly off topic here, I know. Sorry about taht... I found them, but what I can't find is how to start a websocket server with the Webserver plugin... :oops: In the Websocket plugin it was easy, by using an action to start it with the port I needed (1235), but I see no action like that in the Webserver plugin. I have Websocket actions server-client and client-server, but I can only start and stop a client, not a server, it seems. How do I do that?

krambriw
Plugin Developer
Posts: 2570
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

Re: Log redirector and filter

Post by krambriw » Wed Mar 18, 2015 12:55 pm

As soon as you start the Webserver plugin, the websocket server is started automatically and ready for websocket client connections right away. I suppose you have a html page with some javascript. In there find the javascript code where you make the connection. With the Webserver plugin you simply create a connection typically like this:

Code: Select all

    var prot = "";
    var ip = location.host;
    if (location.protocol == "https:") {
        prot = "wss://";
    }
    else {
        prot = "ws://";
    }
    //var wSocket = new WebSocket(prot + ip + "/ws"); //mandatory for Tornado
    var wSocket = new WebSocket(prot + ip); //enough for Webserver
It is described in the Webserver plugin thread

Mastiff
Experienced User
Posts: 872
Joined: Thu May 03, 2012 10:43 am

Re: Log redirector and filter

Post by Mastiff » Wed Mar 18, 2015 1:01 pm

Actually no. I have no Javascript anywhere. Come to think of it I can't really remember why I had it there, but is it possible that it's for your app, with the climate data reports?

Mastiff
Experienced User
Posts: 872
Joined: Thu May 03, 2012 10:43 am

Re: Log redirector and filter

Post by Mastiff » Fri Oct 26, 2018 9:47 pm

Pako, is it possible to do a dual filter in some way? I use the plug-in to save all input, so I can go back and check if something's happened. I tried to load a second instance to log only error mesasge to another file, but the plug-in says it doesn't do multiple instances. Is there some way around that?

Post Reply