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
Fallen.Anvil
Novice


Joined: 12 Jul 2012
Posts: 47

PostPosted: Sun May 01, 2016 6:29 am   

Auto Logging
 
How can I have Cmud start a log every time I log in with a character and store that log in a specific directory?

I'll be wanting to log different characters so if they could have their name added to the log.txt file that would be great.
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4691
Location: Pensacola, FL, USA

PostPosted: Sun May 01, 2016 1:41 pm   
 
#EVENT onConnect {
#LOG %concat(%sessionid, " ", %char, " ", %time(yyyy-mm-dd), " ", %time(hh), "00.txt")
}


%char is only defined as the character name if you have auto log in set up i believe.
So you may need some other way of automatically determining which character the log is for.

#LOG defaults to the session folder, unless you specify a full path name.
_________________
Discord: Shalimarwildcat
Reply with quote
Bradley21
Beginner


Joined: 08 Jan 2016
Posts: 16

PostPosted: Sun May 29, 2016 12:59 am   
 
So...to set up something like this...where would you create it? A trigger?
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4691
Location: Pensacola, FL, USA

PostPosted: Sun May 29, 2016 1:45 am   
 
That snippet of code could be entered on the command line.

#EVENTs are like an alias, but they go off based on other criteria than a line of text from the game.
Though you can #RAISE them from inside a trigger.
The onConnect #EVENT will fire whenever you establish a connection between your client and the game server.
_________________
Discord: Shalimarwildcat
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