ADELIA |
VADELIA |
SADELIA |
WADELIA |
EADELIA |
(I/B) |
(I/B) (C/S) |
(B) (S) |
(I/B) (C/S) |
(B) (C/S) |
Section for use
All
Syntax
ADD_TRACE Message Level LoggerName
Message |
→ |
AlphaConstant | AlphaVar | ClassRefVar |
Level |
→ |
*FATAL | *ERROR | *WARN | *INFO | *DEBUG | *TRACE | Nothing |
LoggerName |
→ |
AlphaConstant | AlphaVar | Nothing |
Description
This instruction adds a Level level trace or a *WARNING level trace if no level is specified.
In a Java context it is possible to add a REF_CLASS variable. The effect of the instruction is then to add the result of serialization of the instance from the referenced class.
A trace can be added to a specific logger by specifying its name.
By default, the trace is added to the logger called:
Platform / Program visibility |
Public |
Private |
Java –Web - Cloud |
<package>.<ObjectName> |
<package>.<ObjectName> |
C/Windows/AS400 |
pgm.env.<ObjectName> |
pgm.<DomainName>.<ObjectName> |
Click here for more information on configuring traces.
Example
ADD_TRACE 'This is a trace'
TraceText = 'This is a trace'
ADD_TRACE TraceText
ADD_TRACE TraceText *ERROR
ADD_TRACE TraceText 'MyLogger"'
ADD_TRACE TraceText *DEBUG 'MyLogger"
VarLogger = 'my.logger'
ADD_TRACE TraceText *DEBUG VarLogger
iFamily = New FAMILY()
ADD_TRACE iFamily *DEBUG