Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
jed
Adept


Joined: 18 Dec 2005
Posts: 246

PostPosted: Sun Dec 24, 2006 7:21 am   

Closing a #log file
 
I can open logs fine and dandy witht #log, and can toggle them closed with #log. However there are times when I start logging something, and I don't know if it is still logging. I do realize that there is a log icon on one of the bottom bars that is on when Im logging.
My questions are 1:is there a pre-defined variable of some sort that captures if logging is occuring? 2. Is there a way to force logging to stop regardless of whether it's on or not?
On number two, again I have a problem where I might open a log with a trigger, but if my closing trigger doesnt fire, the log just stays on. I'd like to be able to close it from a different trigger (by use of a command or function such as #logclose if there was such a thing), but Im afraid to use #lo, because if the first closing toggle trigger fired, then the second one goes, I've inadvertently started a log when I want it closed...
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: Sun Dec 24, 2006 4:27 pm   
 
I don't think there's a way to do this currently - it's a good suggestion.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23377
Location: Colorado, USA

PostPosted: Wed Jan 17, 2007 10:09 pm   
 
Good ideas. I'll add these to the to-do list. I'll probably add an option to the #LOG command where doing: #LOG 0 will force the log file to be closed (if it is open). Then I'll add a %log function that will return the current log status (it will probably return null if logging is off, and will return the name of the log file if logging is on)
Reply with quote
Arminas
Wizard


Joined: 11 Jul 2002
Posts: 1265
Location: USA

PostPosted: Thu Jan 18, 2007 3:16 pm   
 
Why not create your own boolean variable that keeps track of the state of the log? Yes it is a good idea to have this added to the #log command but you could easily keep track of it yourself. With something resembling this.

#var logstat false false

#Trigger {$Your combat to the death is about to begin.} {logstat = true;#log %time}

#Trigger {$You have %w your duel.} {#if (@logstat) {#log;logstat = false} {#say why didn't you log that fight?}}
_________________
Arminas, The Invisible horseman
Windows 7 Pro 32 bit
AMD 64 X2 2.51 Dual Core, 2 GB of Ram
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD General Discussion All times are GMT
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

© 2009 Zugg Software. Hosted by Wolfpaw.net