jetlog.txt missing

kcrowder13

New member
I have trs22+ with script debugging and logging on and the jetlog.txt file is missing. I cannot find anywhere on the drive, did this get discontinued?
 
Jetlog is related to the Auran Jet, which was 1st gen game engine, used up to the TS12. Since TANE there is new engine, called E2, which doesn't generate any jetlog.txt
 
Yes - discontinued as Jagg said. Look for client logs in the Developer options in the startup dialog or any of the CM windows. You will need to enable logging in Trainz Settings->Dev.

It's been this way since TANE.

Edit: add some kind of identifier in your output statements and filter on that. The log can get very crowded.
 
Thank you for the clarification. It can be confusing trying to follow info in the wiki, so much outdated or incomplete material. Does Interface.Log() still output to the client logs? I'm updating/creating rules removing obsolete functions and consistent 'correct' info is scarce.
 
The best place for up to date information on script functions are the TRS22 library scripts. I suggest you take a copy of those scripts and put the copy in some folder for reference purposes. You can find the scripts in your TRS22+ installation folder within "\resources\scripts". Don't view those files directly as inadvertently editing them could break Trainz.

There are two log like functions and its easier for me to quote what the library script says:

C-like:
// in scriptlog.gs

...
  //=============================================================================
  // Desc: Possible log status values, to be used when calling the logging
  //       functions on this class.
  //=============================================================================
  public define int LogStatus_Diagnostic  = 1;
  public define int LogStatus_Warning     = 2;
  public define int LogStatus_Error       = 3;
  public define int LogStatus_Success     = 4;


  //=============================================================================
  // Name: Log
  // Desc: Prints a line of text to the log window/file. Script logging must be
  //       enabled in the game settings at the time the log is generated.
  // Parm: status - One of the LogStatus_* defines above.
  // Parm: msg - The text to print.
  //=============================================================================
  public native void Log(int status, string msg);


  //=============================================================================
  // Name: Log
  // Desc: Adds a single log entry, defaulting to LogStatus_Diagnostic.
  //=============================================================================
  public void Log(string msg) { Log(LogStatus_Diagnostic, msg); }
...
C-like:
// in interface.gs


  //=============================================================================
  // Name: Print
  // Desc: Prints a line of text to the Driver message window. This is typically
  //       used for non-vital event notifications.
  // Parm: msg - Text to print on the in-game message display.
  //=============================================================================
  public native void Print(string msg);

The Print function also shows in the logs but the on screen view will not appear in Surveyor. You can use either the Print or Log function as there isn't a lot of difference.

The current version of TRS22+ shows an option to "Show Logs List". This never shows anything to me and I do a lot of scripting. Maybe N3V plan to split the logs into different categories. That would be useful as the validation messages often blow away all the log entries before you get a chance to view them.
 
Back
Top