Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to "verify" your details, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.
 Entire forum ➜ MUSHclient ➜ Plugins ➜ A plugin to archive logs via datestamping

A plugin to archive logs via datestamping

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by Daniel P   USA  (97 posts)  Bio
Date Sat 03 Sep 2011 10:02 PM (UTC)
Message
A few years ago I discovered this datestamp command-line script called Stampme.cmd (see http://www.gammon.com.au/forum/bbshowpost.php?id=10292), which I use to datestamp my log files (html in my case), and -usually- keep them down under 10MB or so.

Just today I integrated the utils.shellexecute() function to run this within OnPluginDisconnect() and successfully killed off an entire running process (I WAS running MUSHClient.exe out of a command script before and calling archive.bat on close).

And yes, just so you know, utils.shellexecute() IS I believe on the recommended-to-sandbox-out list of possibly dangerous functions.

Anyhow, I've gone and zipped it all up (including the bat and cmd files) and posted it on Google Code: http://depwl9992-mushclient.googlecode.com/files/ArchiveLogs.zip

Load the plugin, edit archive.bat in a text editor to reflect your own log filenames in the given format, and when you disconnect from any world where the plugin is loaded into, the script will be run and the log will be datestamped within the filename.

You could edit stampme.cmd line:

REN "%_pathname%" "%_file%-%_yy%-%_mm%-%_dd% - %_hr%-%_min%%_ext%"

and switch up the _yy, _mm, _dd, _hr, and _min variables to change up the format of your filename, but as is, it should be fairly self-explanatory.
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


8,309 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.