OpenLog
Script function

world.OpenLog

DOC_scripting Read about scripting

Type

Method

Summary

Opens a log file.

Prototype

long OpenLog(BSTR LogFileName, BOOL Append);

DOC_data_types View list of data type meanings


Description

This opens a log file of the name "LogFileName", with optional appending to an existing file of the same name. No previous output lines are written (as may happen when you use the ‘open log’ dialog box), nor is a log-file preamble written. If you want to write those things to the script file, you must do them yourself (see WriteLog).


VBscript example

world.openlog "mylog.txt", false



Jscript example

world.openlog("mylog.txt", false);



PerlScript example

$world->openlog("mylog.txt", false);



Python example

world.openlog("mylog.txt", false)



Lua example

OpenLog ("mylog.txt", false)



Lua notes

The Append flag is optional, and defaults to false.



Return value

eOK: opened OK
eCouldNotOpenLogFile: unable to open the log file
eLogFileAlreadyOpen: log file was already open


DOC_errors View list of return code meanings


See Also ...

Topic

DOC_logging Logging

Functions

FNC_CloseLog CloseLog (Closes the log file)
FNC_FlushLog FlushLog (Flushes the log file to disk)
FNC_IsLogOpen IsLogOpen (Tests to see if a log file is open)
FNC_LogInput LogInput (The property of whether commands are logged to the log file)
FNC_LogNotes LogNotes (The property of whether notes are logged to the log file)
FNC_LogOutput LogOutput (The property of whether MUD output is logged to the log file)
FNC_LogSend LogSend (Sends a message to the MUD and logs it)
FNC_WriteLog WriteLog (Writes to the log file)

(Help topic: function=OpenLog)

DOC_contents Documentation contents page