Skip to main content
Version: v6.5.0

Set-Log-Level

Command Description​

Set log levels that need to be output

Command Prototype​

Log.SetLevel(iLevel)

Parameter Description​

ParameterRequiredTypeDefaultDescription
iLevelTrueenum2The value can be an integer ranging from 0 to 3, representing error, warning, general information, and debugging information respectively. When the value is set to 0, only errors are output. When set to 1, output errors and warnings; When set to 2, general information, errors, and warnings are output. When the value is set to 3, in addition to general information, errors, and warnings, debugging information output by TracePrint is also output to logs

Demo​

TracePrint("------------------------------------------------Set log level-------- -----------------------------------") 
//-------------------------------------------------------------------------------
//[Remarks] Set the log level, the log will only be displayed above a certain level
//Input parameter 1:
// level----->Log level
//out parameters:
// None
Log.SetLevel(2)
TracePrint("The log level is set to level 2, that is, only the three levels of info, warning and error will be displayed")