How to control the logs output - dvdvideo1234/TrackAssemblyTool GitHub Wiki
Logging stream is a general feature in every program,
which shows the interpreter/compiler logical path followed
when various conditions are met during the execution.
It is often used to show status and/or output data flow of
an API
function and it represents a bunch of messages that are sent to various
stream outputs ( console
or file ), displaying the program
current status. It must not affect the logical execution path of the program
or data flow. This means your tracks will be connected the same way with
or without logs enabled.
Note: Logging stream will impact the tool performance, so make sure you disable the feature if you do not need to check or debug something out. Only the admin will have access to enable or disable the logging steam control.
Note: You can also control these values from the utilities admin panel.
This is done using the console variables below:
-
trackassembly_logsmaxThis contains the maximum value of the message counter updated on every log call. The value is incremented after every message displayed. A proper value for this log control variable is10000to30000, keeping the stream in a reasonable length.
Note: When you enable the file stream, it tells the logging feature how many message lines to output before the log file gets deleted by applying the length control keeping it in reasonable size. -
trackassembly_logfileThis controls whenever the log stream should be printed in the console when0is written or the stream should go todata/trackassembly/trackasmlib_log.txtwhen1is written. The value is converted to boolean and cached automatically.
- Open the console using the
`under theECSkey. - Paste
trackassembly_logsmax 10000and hit enter to set the maximum log lines in the file - Paste
trackassembly_logfile 1and hit enter to enable this log file to stream into. - Paste
trackassembly_devmode 1and hit enter to enable the developer mode - On the server in-game hit
RELOADon the world ( def.R) for multiplayer or theMemory settingsbutton in theUtilitiestab - On the client in-game while you are in the menu, shift-right-click the
Memory settingsbutton inUtilitiesadministrator menu - Paste
trackassembly_devmode 0and hit enter to disable the developer mode
- Open the console using the
`under theECSkey. - Paste
trackassembly_logsmax 0and hit enter to set the maximum log lines in the file - Paste
trackassembly_logfile 0and hit enter to disable this log file to stream into. - Paste
trackassembly_devmode 1and hit enter to enable the developer mode - On the server in-game hit
RELOADon the world ( def.R) for multiplayer or theMemory settingsbutton inUtilitiestab - On the client in-game while you are in the menu, shift-right-click the
Memory settingsbutton inUtilitiesadministrator menu - Paste
trackassembly_devmode 0and hit enter to disable the developer mode
It will just print a bunch of log messages in the following format:
<ID> [<date> <time>] <message_instance> > <tool_name> [<database_mode>] <function_name>: <message>
You can easily do that by creating settings for the logs. These are nothing more than
text files, where contents are matched to the logs you want to skip. The path that you
must create these files in is located here: data/trackassembly/set/trackasmlib_sl<suffix>.txt
There are the types of logging settings, where the file <suffix> matches it with down casing:
-
skip(trackasmlib_slskip.txt): If a log message is found persisting in this list, it won't show in the output (a.k.a blacklisted). This is good when a function is called many times and floods -
only(trackasmlib_slonly.txt): All other log messages will be blocked besides the ones in this list (a.k.a only ones whitelisted) This is good when you want to see only one single thing
These are mine if you want to take a look at how to create one.