Logging - MSUTeam/MSU GitHub Wiki

File path: scripts/config/msu/log.nut

Note: This section is specifically about the utility logging features. For the mod-specific Debug system see Debug.

printStackTrace

::MSU.Log.printStackTrace( _maxDepth = 0, _maxLen = 10, _advanced = false )
// _maxDepth and _maxLen are integers
// _advanced is a boolean

Prints the entire stack trace at the point where it is called, including a list of all variables.
Also prints the elements of any arrays or tables up to _maxDepth and _maxLen.
If _advanced is set to true, it also prints the memory address of each object passed by reference.

printData

::MSU.Log.printData( _data, _maxDepth = 1, _advanced = false )
// _data is any data type
// _maxDepth is an integer
// _advanced is a boolean

Prints _data so that if it is an array or table, any elements inside of it will also be displayed as appropriate for their type.
Calls itself recursively on the elements of any arrays or tables up to _maxDepth.
If _advanced is set to true, it also prints the memory address of each object passed by reference. This will also print the file, function & line of the caller.

⚠️ **GitHub.com Fallback** ⚠️