Log.txt

Soul_RiderSoul_Rider Mod Bean Join Date: 2004-06-19 Member: 29388Members, Constellation, Squad Five Blue
Quick question about the log file. Is this written to from the engine or the Lua code? I ask because I can't see anything in the project code, although I am aware core files may be writing out to it.

I would like my mod to write to another log file, pglog.txt, for example, so it does not get over written when I fire up a game of vanilla NS2. Is this possible?

Comments

  • McGlaspieMcGlaspie www.team156.com Join Date: 2010-07-26 Member: 73044Members, Super Administrators, Forum Admins, NS2 Developer, NS2 Playtester, Squad Five Blue, Squad Five Silver, Squad Five Gold, Reinforced - Onos, WC 2013 - Gold, Subnautica Playtester
    The log.txt file is handled by the engine itself. Assuming your mod is loaded correctly, any time you call Print() it will show up in the log.txt file.

    If you want a log specific to your mod, then you'll need to handle the file with your code. However, I do not recommend you do this. When it comes down to it, this can introduce additional problems (unclosed file references, additional file I/O, etc). In most cases the normal log.txt is fine, and it's easy enough to just CTRL+F whatever you need in it.

    Why do you need an extra log?
  • Soul_RiderSoul_Rider Mod Bean Join Date: 2004-06-19 Member: 29388Members, Constellation, Squad Five Blue
    I don't need, I was just wondering if it was a simple thing to do, so if anyone had a problem with PG, then fired up vanilla NS2 after, the log file wouldn't be over written. It was just an idea :)
Sign In or Register to comment.