Add day/date to log file entries?

Got a good idea? You can suggest new features here.

Add day/date to log file entries?

Postby 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.
wysocki
 
Posts: 32
Joined: Mon Nov 23, 2015 9:23 pm
Location: Los Angeles area

Re: Add day/date to log file entries?

Postby 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
A loved one and Time, The 2 things that can never be replaced.

Family, The only thing you don't get to choose in life.
User avatar
kgschlosser
Site Admin
 
Posts: 1362
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Add day/date to log file entries?

Postby 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!
wysocki
 
Posts: 32
Joined: Mon Nov 23, 2015 9:23 pm
Location: Los Angeles area

Re: Add day/date to log file entries?

Postby 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.
A loved one and Time, The 2 things that can never be replaced.

Family, The only thing you don't get to choose in life.
User avatar
kgschlosser
Site Admin
 
Posts: 1362
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA


Return to Feature Requests

Who is online

Users browsing this forum: No registered users and 1 guest