egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Eggdrop switching logfiles at wrong time

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Eggdrop Help
View previous topic :: View next topic  
Author Message
theidleprophet
Voice


Joined: 29 Aug 2011
Posts: 2

PostPosted: Mon Aug 29, 2011 5:44 am    Post subject: Eggdrop switching logfiles at wrong time Reply with quote

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:
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.
Back to top
View user's profile Send private message
speechles
Revered One


Joined: 26 Aug 2006
Posts: 1398
Location: emerald triangle, california (coastal redwoods)

PostPosted: Mon Aug 29, 2011 2:38 pm    Post subject: Re: Eggdrop switching logfiles at wrong time Reply with quote

theidleprophet wrote:
Code:
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:
set timezone "EST"

set offset "5"

set env(TZ) "$timezone$offset"

... snipped irrelevant parts...

set switch-logfiles-at 500

...

Quote:
<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..
_________________
speechles' eggdrop tcl archive
Back to top
View user's profile Send private message
theidleprophet
Voice


Joined: 29 Aug 2011
Posts: 2

PostPosted: Tue Aug 30, 2011 12:21 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Eggdrop Help All times are GMT - 4 Hours
Page 1 of 1

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


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber