OpenLog

From Spheriki

Jump to: navigation, search

Opens a debugging log file for input.


Contents

Usage

Log OpenLog(filename);
  • filename The filename of the log to create or append to within the logs/ directory of the game.


Examples

var my_log = OpenLog("loggy.txt");
my_log.write("Hello everybody!");

This simple example will create a new log logs/loggy.txt, containing the date and time which the log was opened, and the message "Hello everybody!" Subsequent runs of this example will add to the existing log entries.


Notes

  • Logs are useful for debugging, to determine the flow of a game without interrupting it.
  • This function returns a Sphere Log object. See the relevant page for details.


See also

  • Sphere Log object
Personal tools