This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Eggdrop switching logfiles at wrong time

General support and discussion of Eggdrop bots.
Post Reply
t
theidleprophet
Voice
Posts: 2
Joined: Mon Aug 29, 2011 5:33 am

Eggdrop switching logfiles at wrong time

Post by theidleprophet »

I've gotten everything else in eggdrop worked out so far, but the one thing I haven't gotten to work is getting the logfiles to switch over at 5:00AM instead of midnight. I'm having to manually append the first 5 hours of the next day onto the previous day's log before I can zip and move the file to my FTP server.

Here's the relevant parts of my .conf:

Code: Select all

set timezone "EST"

set offset "5"

#set env(TZ) "$timezone$offset"

set max-logs 6

set max-logsize 0

set quick-logs 0

set raw-log 0

logfile mco * "logs/eggdrop.log"

logfile jpk #chan1 "logs/chan1/chan1.log"
logfile jpk #chan2 "logs/chan2/chan2.log"
logfile jpk #chan3 "logs/chan3/chan3.log"
logfile jpk #chan4 "logs/chan4/chan4.log"
logfile jpk #chan5 "logs/chan5/chan5.log"

set log-time 1

set timestamp-format {[%H:%M:%S]}

set keep-all-logs 1

set logfile-suffix ".%Y%b%d"

set switch-logfiles-at 500

set quiet-save 0
All timestamps are correct both while running and in logfiles. It saves user and channel files at the correct time.

EDIT: .set switch-logfiles-at 500 causes eggdrop to say "Ok, set." but doesn't actually make it switch the logfiles over at the set time.
User avatar
speechles
Revered One
Posts: 1398
Joined: Sat Aug 26, 2006 10:19 pm
Location: emerald triangle, california (coastal redwoods)

Re: Eggdrop switching logfiles at wrong time

Post by speechles »

theidleprophet wrote:

Code: Select all

set timezone "EST"

set offset "5"

#set env(TZ) "$timezone$offset" 

... snipped irrelevant parts...

set switch-logfiles-at 500

...
If I were a betting man, which who isn't? What it looks like, is the offset is NOT taken into account for the "switch-logfiles-at" time. So it _IS_ switching the logfiles at 5am, but you are 5 hours off of GMT. So your timestamps of course show it happens at midnight.

Try setting "switch-logfiles-at" to 1000. Which would be 10am, minus your 5 hour offset, arrives precisely at 5am. You may be surprised.

Or conversely, you could simply do this:

Code: Select all

set timezone "EST"

set offset "5"

set env(TZ) "$timezone$offset" 

... snipped irrelevant parts...

set switch-logfiles-at 500

...
<thommey> set env(TZ) $timezone$offset
<thommey> must be executed for the timezone and offset having effect on eggdrops internals.
There you have it. Two ways to acheive the same thing..
t
theidleprophet
Voice
Posts: 2
Joined: Mon Aug 29, 2011 5:33 am

Post by theidleprophet »

Setting it to switch-logfiles-at 1000 failed, it still switched over at midnight. I'll set it back to 500 and uncomment that line and let you know at 5:00AM if it worked.

EDIT: No such luck. When I uncommented that line, it caused eggdrop to think it was an hour earlier than it was (i.e. fail to account for daylight savings). When I fixed it manually, it passed midnight again and started new log files, again at "midnight" (despite it having been 20 minutes past midnight at the time). It didn't switch over at 5AM.

I can't think of any other reasons this wouldn't work. I've gone through my entire .conf three times, checking and double and triple checking my settings.
Post Reply