Difference between revisions of "Extensions.Logging.WriteLog"

From emotive
Jump to navigation Jump to search
m (Hb moved page WriteLog to Extensions.Logging.WriteLog: #3153)
 
(9 intermediate revisions by one other user not shown)
Line 1: Line 1:
[[Category:Logging]]
+
{{DISPLAYTITLE:'''WriteLog '''}}[[Category:Logging]]
 
== Classification ==
 
== Classification ==
{{ClassificationActivity | WriteLog | Writing a log message | [[Action]] | [[Logging|OTX Logging extension]] | [[Logging related actions]] | [[InvalidReferenceException]] | - }}
+
{{ClassificationActivity | WriteLog | Writing a log message | [[Action]] | [[Extensions.Logging|OTX Logging extension]] | [[Extensions.Logging#Actions|Logging related actions]] | [[Core.DataTypes.ComplexDataType.InvalidReferenceException|InvalidReferenceException]] | - }}
  
 
== OTL Syntax ==
 
== OTL Syntax ==
 
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;">
 
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;">
Logging.WriteLog(SeverityLevel, StringTerm, StringTerm);
+
Logging.WriteLog(SeverityLevelTerm level, StringTerm target, StringTerm message);
 
</syntaxhighlight>
 
</syntaxhighlight>
  
 
== Description ==
 
== Description ==
With the '''WriteLog''' activity a log message is written by the OTX runtime environment at the end of a log file, see [[Logging]].
+
The '''WriteLog''' activity will cause the OTX runtime system to write a log-message into a logging-resource provided that the severity-level of that message is higher or equal than the currently set log-level threshold. The particular logging-resource to which the log-message will be written may be identified by the optional '''<target>''' element. Otherwise (if no explicit target is given), the location of the logging-resource depends on the specific runtime system settings. See [[Extensions.Logging|Logging]].
  
 
== Properties ==
 
== Properties ==
 
{| {{TableHeader}}
 
{| {{TableHeader}}
 
{{TableRowPropertiesHeader}}
 
{{TableRowPropertiesHeader}}
{{TableRowPropertie1| Level | [[SeverityLevel]] | [[Value]] | @SeverityLevel:TRACE | [1] | Severity level with the following values, see [[Logging]].}}
+
{{TableRowPropertie2| Level | [[Extensions.Logging.SeverityLevel|SeverityLevel]] | [[Term]] | - | [1] | This element represents the severity-level of the log-message, see [[Extensions.Logging|Logging]].}}
{{TableRowPropertie2| Target | [[String]] | [[Term]] | - | [0..1] | Location of the log file (URL)}}
+
{{TableRowPropertie1| Target | [[Core.DataTypes.SimpleDataType.String|String]] | [[Term]] | - | [0..1] | The optional element will be used for locating the resource to which the message will be written. The target will be defined by a URI}}
{{TableRowPropertie1| Message | [[String]] | [[Term]] | - | [0..1] | Message being written}}
+
{{TableRowPropertie2| Message | [[Core.DataTypes.SimpleDataType.String|String]] | [[Term]] | - | [1] | This string value represents the log-message}}
 
|}
 
|}
  
 
== OTL Examples ==
 
== OTL Examples ==
 
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;">
 
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;">
Logging.WriteLog(@SeverityLevels:TRACE, null, null);
+
/// Local Declarations
 +
 
 +
/// Flow
 +
 
 +
Logging.WriteLog(@SeverityLevel:TRACE, NULL, "Message");
 
</syntaxhighlight>
 
</syntaxhighlight>
  
 
== See also ==
 
== See also ==
[[SetLogLevel]]
+
[[Extensions.Logging.SetLogLevel|SetLogLevel]]

Latest revision as of 02:45, 13 September 2019

Classification

Name WriteLog
Short Description Writing a log message
Class Action
Extension OTX Logging extension
Group Logging related actions
Exceptions InvalidReferenceException
Checker Rules -
Standard Compliant Yes

OTL Syntax

Logging.WriteLog(SeverityLevelTerm level, StringTerm target, StringTerm message);

Description

The WriteLog activity will cause the OTX runtime system to write a log-message into a logging-resource provided that the severity-level of that message is higher or equal than the currently set log-level threshold. The particular logging-resource to which the log-message will be written may be identified by the optional <target> element. Otherwise (if no explicit target is given), the location of the logging-resource depends on the specific runtime system settings. See Logging.

Properties

Name Data Type Class Default Cardinality Description
Level SeverityLevel Term - [1] This element represents the severity-level of the log-message, see Logging.
Target String Term - [0..1] The optional element will be used for locating the resource to which the message will be written. The target will be defined by a URI
Message String Term - [1] This string value represents the log-message

OTL Examples

/// Local Declarations

/// Flow

Logging.WriteLog(@SeverityLevel:TRACE, NULL, "Message");

See also

SetLogLevel