-
Notifications
You must be signed in to change notification settings - Fork 4
Logging
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.
::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.
::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.
- NOTE: MSU guarantees backwards compatibility for documented features and code only. Undocumented features/code of MSU may be changed at any time without notice, so we advise against using/referencing such code in your projects.
- For bug reports or feature requests, please create issues.
- If you would like to join the team, write to us at msu.team@protonmail.com.