Log Class
The scope of applications for UnigineScript is limited to implementing materials-related logic (material expressions, scriptable materials, brush materials). Do not use UnigineScript as a language for application logic, please consider C#/C++ instead, as these APIs are the preferred ones. Availability of new Engine features in UnigineScipt (beyond its scope of applications) is not guaranteed, as the current level of support assumes only fixing critical issues.
This class represents an interface for printing various types of messages to the console and to the log file. It can be useful to monitor overall progress of application execution and report errors which can be helpful in the process of debugging.
To enable displaying system messages in the Console use the following command: show_messages 1
There are two custom color schemes highlighting log syntax for Notepad++ included in the SDK:
- <SDK>/utils/log_styles/notepad_light.xml
- <SDK>/utils/log_styles/notepad_dark.xml
Example#
The following code demonstrates how to print various types of messages.
Log Class
Members
void log.error ( string str, ... ) #
Prints an error message to the console and the log file.Arguments
- string str - Error message to print.
- ... - Arguments, multiple allowed.
void log.fatal ( string str, ... ) #
Prints a fatal error message to the log file and quits the engine.Arguments
- string str - Fatal error message to print.
- ... - Arguments, multiple allowed.
void log.message ( string str, ... ) #
Prints a message to the console and the log file.Arguments
- string str - Message to print.
- ... - Arguments, multiple allowed.
void log.warning ( string str, ... ) #
Prints a warning to the console and the log file.Arguments
- string str - Warning to print.
- ... - Arguments, multiple allowed.
Last update:
2020-07-31
Help improve this article
Was this article helpful?
(or select a word/phrase and press Ctrl+Enter)