Add day/date to log file entries?

Got a good idea? You can suggest new features here.
Post Reply
wysocki
Posts: 43
Joined: Mon Nov 23, 2015 9:23 pm
Location: Los Angeles area

Add day/date to log file entries?

Post by wysocki » Tue Oct 04, 2016 4:07 am

I have the Log Redirector and Filter installed and it does what it is supposed to do. However, it'd be great if there was an option to include the date (or at least the day) in the log entry. I returned from a vacation and I have driveway sensors that were triggered as a result of a burglary and I thought it'd be great to see if EG "saw" the person coming and going while I was gone. REALLY hard to do without a date in the log file.

User avatar
kgschlosser
Site Admin
Posts: 3021
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Add day/date to log file entries?

Post by kgschlosser » Tue Oct 04, 2016 7:26 pm

if you go into c:\ProgramFiles(x86)\EventGhost\eg\Classes\MainFrame there is a file called LogCtrl.py

you can open this file up in notepad. it is a text file. but i would suggest using a text editor that can show line numbers.

but you will still be able to search for this line

Code: Select all

strftime(" %H:%M:%S   ", localtime(when))
and change it to this

Code: Select all

strftime(" %x - %H:%M:%S   ", localtime(when))
that should give you the date in the log entries as well

:D

enjoy

K
If you like the work I have been doing then feel free to Image

wysocki
Posts: 43
Joined: Mon Nov 23, 2015 9:23 pm
Location: Los Angeles area

Re: Add day/date to log file entries?

Post by wysocki » Mon Oct 10, 2016 10:44 pm

Thanks much! Found it on line 257. Actually I just added a %d instead of the %x since all I wanted was the day number. Just gotta remember to include that if I install an update to EG!

User avatar
kgschlosser
Site Admin
Posts: 3021
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Add day/date to log file entries?

Post by kgschlosser » Thu Oct 13, 2016 11:03 am

no worries. just make a text file in your documents called EG upgrades. and only put the line number, the file name and location and the actual code snippet. this way you can go back through and re add them if you upgrade EG at all.
If you like the work I have been doing then feel free to Image

Post Reply