Author |
|
jeffw_00 Super User
Joined: June 30 2007
Online Status: Offline Posts: 929
|
Posted: November 24 2007 at 16:10 | IP Logged
|
|
|
Hi - I know about "Trim event log", but, well, I guess part of the power of powerhome is that if you're tired enough you can, well, generate an infinite loop... 8-{. No harm done, but my event log is wicked big. I could create a macro to trim it to nothing and run it, and I suppose I should, (will it clear everything with an argument of 0?) but I'm surprised there isn't a simple 'clear event log' button somewhere.... 8-}
/j
ps - minor feature request for the future - be able to (sigh) select and delete a portion of the log 8-}
|
Back to Top |
|
|
bhlonewolf Senior Member
Joined: March 29 2007
Online Status: Offline Posts: 198
|
Posted: November 24 2007 at 18:39 | IP Logged
|
|
|
You could create your own control center screen and just have that button trim the event log :)
|
Back to Top |
|
|
jeffw_00 Super User
Joined: June 30 2007
Online Status: Offline Posts: 929
|
Posted: November 24 2007 at 19:23 | IP Logged
|
|
|
yes, I know. but "trim" isn't clear, I think? ( i suppose i could try a trim of 0)
|
Back to Top |
|
|
BeachBum Super User
Joined: April 11 2007 Location: United States
Online Status: Offline Posts: 1880
|
Posted: November 24 2007 at 20:25 | IP Logged
|
|
|
OK, trim means to "strip" in programming terms.. So I would assume you would trim the log to a point one would want to review the last events. I trim mine back to the last two days because that is all I can remember. To each their own. Nice article by the way.
__________________ Pete - X10 Oldie
|
Back to Top |
|
|
dhoward Admin Group
Joined: June 29 2001 Location: United States
Online Status: Offline Posts: 4447
|
Posted: November 24 2007 at 20:45 | IP Logged
|
|
|
Typically what I recommend (and do myself) is to set a timed event at 5 seconds past midnight to trim the event log to the last two days:
ph_trimeventlog(2)
If this is executed at 5 seconds past midnight, 1 day will be the five seconds that have elapsed since midnight and the 2nd day will be the entire previous day, from midnight to midnight. This will allow you to always review the current day as well as the day previous. Alternatively, to save the eventlog, you can use the ph_exporteventlog which will export as well as trim.
One of the things planned is to create a plugin that performs database maintenance such as trimming/exporting the eventlog (I love plugins ).
Dave.
|
Back to Top |
|
|
jeffw_00 Super User
Joined: June 30 2007
Online Status: Offline Posts: 929
|
Posted: November 24 2007 at 21:12 | IP Logged
|
|
|
Thanks guys. I generally want to keep a couple of weeks of log right now as I'm tracking down some intermittent problems. However, today I unfortunately created an infinite loop that made the log grow exponentially. What I wanted to do right after that was reduce it to zero, but I guess there's no way to do that right now.
izok
/j
|
Back to Top |
|
|
dhoward Admin Group
Joined: June 29 2001 Location: United States
Online Status: Offline Posts: 4447
|
Posted: November 24 2007 at 21:20 | IP Logged
|
|
|
Ive gotcha. Yes, ph_trimeventlog(0) will completely clear the eventlog (except for the single clear event log event). The 0 means to keep 0 days of content.
I thought you were referring to periodic maintenance. I can add to the to-do list a menu command to completely wipe the event log.
Dave.
|
Back to Top |
|
|
jeffw_00 Super User
Joined: June 30 2007
Online Status: Offline Posts: 929
|
Posted: November 25 2007 at 00:41 | IP Logged
|
|
|
ok - no need - i can create a macro/button to do it.
That's the power of powerhome 8-}
/j
|
Back to Top |
|
|