Active TopicsActive Topics  Display List of Forum MembersMemberlist  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
PowerHome General
 PowerHome Messageboard : PowerHome General
Subject Topic: clear event log? Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
jeffw_00
Super User
Super User


Joined: June 30 2007
Online Status: Offline
Posts: 929
Posted: November 24 2007 at 16:10 | IP Logged Quote jeffw_00

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 View jeffw_00's Profile Search for other posts by jeffw_00
 
bhlonewolf
Senior Member
Senior Member


Joined: March 29 2007
Online Status: Offline
Posts: 198
Posted: November 24 2007 at 18:39 | IP Logged Quote bhlonewolf

You could create your own control center screen and just have that button trim the event log :)
Back to Top View bhlonewolf's Profile Search for other posts by bhlonewolf
 
jeffw_00
Super User
Super User


Joined: June 30 2007
Online Status: Offline
Posts: 929
Posted: November 24 2007 at 19:23 | IP Logged Quote jeffw_00

yes, I know. but "trim" isn't clear, I think? ( i suppose i could try a trim of 0)
Back to Top View jeffw_00's Profile Search for other posts by jeffw_00
 
BeachBum
Super User
Super User
Avatar

Joined: April 11 2007
Location: United States
Online Status: Offline
Posts: 1880
Posted: November 24 2007 at 20:25 | IP Logged Quote BeachBum

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 View BeachBum's Profile Search for other posts by BeachBum
 
dhoward
Admin Group
Admin Group
Avatar

Joined: June 29 2001
Location: United States
Online Status: Offline
Posts: 4447
Posted: November 24 2007 at 20:45 | IP Logged Quote dhoward

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 View dhoward's Profile Search for other posts by dhoward Visit dhoward's Homepage
 
jeffw_00
Super User
Super User


Joined: June 30 2007
Online Status: Offline
Posts: 929
Posted: November 24 2007 at 21:12 | IP Logged Quote jeffw_00

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 View jeffw_00's Profile Search for other posts by jeffw_00
 
dhoward
Admin Group
Admin Group
Avatar

Joined: June 29 2001
Location: United States
Online Status: Offline
Posts: 4447
Posted: November 24 2007 at 21:20 | IP Logged Quote dhoward

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 View dhoward's Profile Search for other posts by dhoward Visit dhoward's Homepage
 
jeffw_00
Super User
Super User


Joined: June 30 2007
Online Status: Offline
Posts: 929
Posted: November 25 2007 at 00:41 | IP Logged Quote jeffw_00

ok - no need - i can create a macro/button to do it.
That's the power of powerhome 8-}
/j
Back to Top View jeffw_00's Profile Search for other posts by jeffw_00
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum