Log Manager

Log manager used in Ascension and Meltdown 2 - comes with onTime event system.
http://bhall.radiantage.net/logmanager.rar

Installation:
Copy all files to your mod's scripts folder.

At the bottom of server.cs add this line:
exec("scripts/logmanager.cs");

// init loggers
logManager.initLoggers();
    
// Start Main Loop - for onTime functionality
startMainLoop();
    
// Schedule nightly logger restart for new date
onTime("0000", "logManager.restartLoggers();");

See logmanager.cs for further configuration options

Usage:
In the scripts/loggers directory, there are several loggers, these files create in-game fileobjects which handle writing files to a specific directory - see these files to determine how to craft a logger to operate how you wish

Attach a log event (example):
logManager.logToFile("ChatLog", "["@formatTimeString("HH:nn:ss")@"]" SPC %msg);

onTime() example:
onTime("2100", "echo(\"Hello 9 o'clock world!\");");

There is also fine-tuned control over activating and deactivating specific loggers, see the code for details.

Comments

Sign In or Register to comment.