Author Topic: Suppose I try to log some data in this method - what if I crash?  (Read 1359 times)

do you know where this functionality is defined?
Operating system has to close all handles used by a crashed  process. It could be a bound address and port or a file.

Pretty sure he wanted to know more about how the console.log is handled, not just in a crashing sense.

It's a file that's opened from when the engine starts, written to during the course of operation, and closed when it stops.

Imagine having an openForWrite and never closing it.

Imagine having an openForWrite and never closing it.
which is basically what i was asking in op lol.
Pretty sure the console stuff is in the engine itself.
i presume this means I won't find it in the SDK?

i presume this means I won't find it in the SDK?
Doesn't the SDK have the source?

i guess
i dunno lol.


we're not talking the executable or C (++?) source, are we?

heres what i'm asking: is the console.log functionality written in torquescript (and therefore can be accessed in torquescript) or is it not there?

It's not in torquescript.

okay there goes that magical idea

What exactly are you wanting in the console.log functionality?

packaging the... fileObject::writeLine part to capture stdout (more accurately: logs of information transferred to stdout) inside of blockland

preferably ignoring the non-console.log parts of the writeLine calls

packaging the... fileObject::writeLine part to capture stdout (more accurately: logs of information transferred to stdout) inside of blockland

preferably ignoring the non-console.log parts of the writeLine calls

Ah. There are ways to do that by making an external script monitor the file I/O for changes in that specific file, if you want to go down that road.

Neither of you knows how it works.

Neither of you knows how it works.
in my defense, what i said to ip was my theory which i found just now won't work
Ah. There are ways to do that by making an external script monitor the file I/O for changes in that specific file, if you want to go down that road.
ehhhhh
nah. there are easier ways of doing this besides opening and closing files repeatedly

not to mention blockland/torque leaving the file open, therefore external programs cannot access it.
try opening your console.log in notepad while blockland is running.
« Last Edit: August 09, 2012, 07:44:13 PM by Lugnut »

Neither of you knows how it works.
Mmmkay, enlighten us.

besides opening and closing files repeatedly
That's not what I mean, i mean The computer monitors changes in the file and calls a method when your specific file is edited.

That's not what I mean, i mean The computer monitors changes in the file and calls a method when your specific file is edited.
thought of this after posting:
not to mention blockland/torque leaving the file open, therefore external programs cannot access it.
try opening your console.log in notepad while blockland is running.
therefore, when the file is 'modified' is only called when blockland closes