Method Log
- Namespace
- Skyline.DataMiner.Automation
- Assembly
- SLManagedAutomation.dll
Log(string)
Adds an entry in the SLAutomation.txt log file.
public void Log(string message)
Parameters
message
stringThe message to log.
Examples
engine.Log("My log message");
Remarks
- In DataMiner 10.4.0 [CU10]/10.5.1 (RN 41195), some changes are introduced in the locking behavior of this Automation script action. From these versions onward, text that supports the dummy placeholder will display the old element name if it is updated during the execution of a script, or it will still display the element name even if the element has been deleted in the meantime.
- From DataMiner 10.5.6/10.6.0 onwards (RN 42572), logging will also be added in a dedicated log file with the name of the Automation script. For additional information, see Log.
- To configure a custom log level for a specific script in its dedicated log file, send an UpdateLogfileSettingMessage in which Name is set to "Automation\ScriptName". If no custom log configuration exists for a particular Automation script, the default configuration will be used.
Exceptions
- DataMinerException
Log failed.
Log(string, LogType, int)
Adds an entry in the SLAutomation.txt log file.
public void Log(string message, LogType type, int logLevel)
Parameters
Examples
engine.Log("My log message", LogType.Always, 5);
Remarks
- In DataMiner 10.4.0 [CU10]/10.5.1 (RN 41195), some changes are introduced in the locking behavior of this Automation script action. From these versions onward, text that supports the dummy placeholder will display the old element name if it is updated during the execution of a script, or it will still display the element name even if the element has been deleted in the meantime.
- From DataMiner 10.5.6/10.6.0 onwards (RN 42572), logging will also be added in a dedicated log file with the name of the Automation script. For additional information, see Log.
- To configure a custom log level for a specific script in its dedicated log file, send an UpdateLogfileSettingMessage in which Name is set to "Automation\ScriptName". If no custom log configuration exists for a particular Automation script, the default configuration will be used.
Exceptions
- DataMinerException
Log failed.
Log(string, LogType, int, string)
Adds an entry in the SLAutomation.txt log file.
public void Log(string message, LogType type, int logLevel, string method)
Parameters
message
stringThe message to log.
type
LogTypeThe log type.
logLevel
intThe log level.
method
stringThe method name to include in the log entry.
Examples
engine.Log("My log message", LogType.Always, 5, "Initialize");
Remarks
- In DataMiner 10.4.0 [CU10]/10.5.1 (RN 41195), some changes are introduced in the locking behavior of this Automation script action. From these versions onward, text that supports the dummy placeholder will display the old element name if it is updated during the execution of a script, or it will still display the element name even if the element has been deleted in the meantime.
- From DataMiner 10.5.6/10.6.0 onwards (RN 42572), logging will also be added in a dedicated log file with the name of the Automation script. For additional information, see Log.
- To configure a custom log level for a specific script in its dedicated log file, send an UpdateLogfileSettingMessage in which Name is set to "Automation\ScriptName". If no custom log configuration exists for a particular Automation script, the default configuration will be used.
Exceptions
- DataMinerException
Log failed.