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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
darkceili
Newbie


Joined: 01 Jun 2009
Posts: 6

PostPosted: Wed Jun 03, 2009 4:56 pm   

Log Rotation
 
I have an alias setup on Achaea to start logging atconnect.

It simply looks like this: #ALIAS atconnect {#LO achaea.txt}

Is there a way I can arrange this to log the way I want it, like this:

1) The name of the log should be like todays date. I don't care what format, it can be like 06/03/2009.txt or something similar.

2) When logging, it should append to the .txt file that corresponds to the date. So anytime I log on during June 3rd, it will write the session into the bottom of the June 3rd 2009 txt file. When it becomes June 4th, it should begin writing into the June 4th log file.

I wanna be able to do this to easily sort out logs, and not get one gigantic file to work with. This way I can delete older logs as time goes on, but still keep the newer stuff, in case I need it.

Any help would be appreciated.
Reply with quote
darkceili
Newbie


Joined: 01 Jun 2009
Posts: 6

PostPosted: Wed Jun 03, 2009 5:35 pm   
 
On a side note. How can I get everything to log???

I used that above, and browsed through the help files on Achaea. Only when I open the log, it is like it stopped logging on it's own or something. >_<

Why must it be so hard to get this thing working? There is next to zero help on Log files in the help.
Reply with quote
ralgith
Sorcerer


Joined: 13 Jan 2006
Posts: 715

PostPosted: Wed Jun 03, 2009 6:59 pm   
 
This has been recently covered and is in the Finished Scripts forum. Under Autolog (Automatic Log File, not Automatic Log In).

To take the cream of the crop from there:

Fang's Log Changeover At Midnight:
Code:
#alarm 00:00:00 {#log %concat(C:\yourlogpathhere\yourlognamehere-",%time("yyyy-mm-dd"),".txt")}


Qaiia's AtConnect for starting logging upon log in to MUD (Note, DO NOT USE IF YOUR MUD DISPLAYS YOUR PASSWORD IN PLAIN TEXT):
Code:
#ALIAS atconnect {#LOG %concat("C:\Documents and Settings\Administrator\Desktop\logs\", %time("yyyy-mm-dd"), ".txt")}


If your mud displays your password in plain text, you can add this to the autolog triggers AFTER your password has been entered:
Code:
#LOG %concat("C:\Documents and Settings\Administrator\Desktop\logs\", %time("yyyy-mm-dd"), ".txt")


You can also write a script to rotate (delete logs older than a certain time frame) if you wish.
_________________
CrossOver: Windows Compatibility on Mac and Linux CMUD Advocate
Reply with quote
darkceili
Newbie


Joined: 01 Jun 2009
Posts: 6

PostPosted: Wed Jun 03, 2009 7:02 pm   
 
Thank you ralgith.

So I want to use the first two.

All I should need to do is type those two into the command area and hit enter, and it'll set it up automatically for me?
Reply with quote
ralgith
Sorcerer


Joined: 13 Jan 2006
Posts: 715

PostPosted: Thu Jun 04, 2009 5:57 pm   
 
Correct, though you can also embed them in a class:

Enter all of this at once on the command line:
Code:
#CLASS {Log To File}
#alarm 00:00:00 {#log %concat(C:\yourlogpathhere\yourlognamehere-",%time("yyyy-mm-dd"),".txt")}
#ALIAS atconnect {#LOG %concat("C:\Documents and Settings\Administrator\Desktop\logs\", %time("yyyy-mm-dd"), ".txt")}
#CLASS 0
_________________
CrossOver: Windows Compatibility on Mac and Linux CMUD Advocate
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD 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