I seem to be misunderstanding the help section about world.log. To try testing it how I thought it worked I did this:
Test()
world.log = file("test.txt")
var/list/temp
temp = temp.len //obviously produces a runtime error
yet the file is not created, and the error is not stored there. I used "Log Session" in dreamseeker and still no errors were stored (normal text output was).
How can I have it store copies of any runtime errors into a file (prefferably text) of my choice?
ID:177043
Nov 15 2002, 1:22 am
|
|
In response to Ebonshadow
|
|
It seems the help section needs to be corrected or clarified then because it says that you can change the file location in your code.
"Sending output to world.log may be useful for debugging purposes. The output goes to the same place run-time proc errors are displayed. Example: if(1+1 != 2) world.log << "Uh oh. You can assign world.log to a file name or file() object to redirect output to that file. (There is also a command-line option to Dream Daemon that does this.) Example: world.log = file("mylog.txt")" It also states that sending output to world.log puts it in the same place runtime proc errors are displayed. That seems to say that the errors are saved in the log file as well as sending output to the world.log file saves that output. |
world.log does not allow you change where the log file is, though I believe that can be done through dream daemon. world.log is used like this:
mob/verb/LogText(msg as text)
world.log << msg
msg is then appended to the log file, or displayed in red if no log exists.