Logging 

 

Overview 

To help diagnose problems and improve transparency of Ornatrix processes there exists a robust logging system. Messages produced by Ornatrix are logged both inside Maya's script editor and inside a file external to Maya. This allows for a flexible way of analyzing actions performed by Ornatrix and also for sending diagnostics information to us for analysis. You can customize the verbosity of messages which are visible. Errors and warnings are visible by default and more details information and verbose messages can be turned on optionally.

 

Logger Targets 

Ornatrix can print its log messages in a number of places. These include Maya's script, error, and console windows, and an external log file.

 

External Log File 

If external log file is used it will be saved in:
  • On Windows: C:\Users\USERNAME\AppData\Local\Temp\OrnatrixMaya.log (or whatever is set for TEMP environment variable)
  • On Mac: /tmp/OrnatrixMaya.log
  • On Linux: /tmp/OrnatrixMaya.log
 

Controlling Verbosity 

Ornatrix allows you to modify the level of verbosity produced by the logger. Error and warning messages are visible by default. However, to see information and detailed verbose messages you need to modify the verbosity manually. To do so use the OxSetLogLevel MEL command in Maya's command editor.

// Sets the logging level for specified target, optionally querying current assertion count
int OxSetLogLevel [-ac] [-s] [-f] [-m] [-c] loggerLevel

  • -ac: When set current number of assertions since last call will be returned
  • -s: Set logger level for script window
  • -f: Set logger level for log file
  • -m: Set logger level for Maya error window
  • -c: Set logger level for Maya console
  • loggerLevel: Can be any of the following values:
    • none: No messages are logged
    • error: Only errors are logged
    • warning: Errors and warnings are logged
    • info: Informative messages are logged
    • verbose: All messages, including diagnostics info, are logged
    • default: Resets logger to default value

Example:

OxSetLogLevel -s console

Missing Something? Let us know if this page needs more information about the topic.