Log params in dedicated server seem to have no effect
by Netwyrm · in Torque 3D Professional · 07/25/2011 (10:12 pm) · 0 replies
Let me preface this by saying I'm most likely wrong, so please bear with me if I am not understanding how to use the feature in question.
Windows 7 64-bit
AFX+UAISK T3D 1.1 Beta 3
That out of the way, this is what I am currently struggling with. The log file... it doesn't seem to respond in the way I would expect given this information located in game/main.cs:
The goal is to be able to launch multiple instances of the server from batch scripts located in the same directory (so as not to maintain multiple directories whose only difference is the level loaded). The batch script looks like this:
where "levels\levelFileName.mis" are different for each instance. Running the batch script does successfully launch the server instance (I made some modifications which handle the port differentiation necessary to do so). The problem is setting the flag to 0, 1 or 2 does not seem to result in the behavior expected.
I looked at console.cpp C-side, in hopes of simply creating multiple logfiles, but that rapidly outstripped my ability level. So I decided that I would instead use the flag in the batch script to pass in a "1" for the instance I was trying to debug, and "0" to the others (I'm actually working on zoning), and ran into the problem I describe here--I cannot seem to even disable the console file with a 0 flag.
I ran these tests by restarting the computer, deleting any existing console file, changing the flag, and launching the dedicated server instance. I do not see the behaviors ascribed to the flags in main.cs. All I see are logfiles created regardless of the flag passed in.
I'm ranking my current exasperation level at 2.5 Bjerings, after getting hungup on the trigger parenting callback error for several hours this weekend before realizing it was spurious, and now this... I'm hoping it's just me being stupid, and someone can explain how to make it go. In tiny, simple, little words...
Windows 7 64-bit
AFX+UAISK T3D 1.1 Beta 3
That out of the way, this is what I am currently struggling with. The log file... it doesn't seem to respond in the way I would expect given this information located in game/main.cs:
// Notes on logmode: console logging is written to console.log. // -log 0 disables console logging. // -log 1 appends to existing logfile; it also closes the file // (flushing the write buffer) after every write. // -log 2 overwrites any existing logfile; it also only closes // the logfile when the application shuts down. (default)
The goal is to be able to launch multiple instances of the server from batch scripts located in the same directory (so as not to maintain multiple directories whose only difference is the level loaded). The batch script looks like this:
start ProjectName.exe -log 0 -dedicated -mission levels\levelFileName.mis
where "levels\levelFileName.mis" are different for each instance. Running the batch script does successfully launch the server instance (I made some modifications which handle the port differentiation necessary to do so). The problem is setting the flag to 0, 1 or 2 does not seem to result in the behavior expected.
I looked at console.cpp C-side, in hopes of simply creating multiple logfiles, but that rapidly outstripped my ability level. So I decided that I would instead use the flag in the batch script to pass in a "1" for the instance I was trying to debug, and "0" to the others (I'm actually working on zoning), and ran into the problem I describe here--I cannot seem to even disable the console file with a 0 flag.
I ran these tests by restarting the computer, deleting any existing console file, changing the flag, and launching the dedicated server instance. I do not see the behaviors ascribed to the flags in main.cs. All I see are logfiles created regardless of the flag passed in.
I'm ranking my current exasperation level at 2.5 Bjerings, after getting hungup on the trigger parenting callback error for several hours this weekend before realizing it was spurious, and now this... I'm hoping it's just me being stupid, and someone can explain how to make it go. In tiny, simple, little words...
About the author
My adventures in T3D are chronicled at http://www.worldofantra.com. Please be aware the subject is sword-and-sorcery, and the occasional bloody or bare body part may be in scope.