Apama 10.3 | Apama Documentation | Developing Apama Applications | Developing Apama Applications in EPL | Defining What Happens When Matching Events Are Found | Logging and printing | Examples of using log statements
Examples of using log statements
Suppose you insert DEBUG log statements without actions in a monitor. You specify ERROR as the log level for that monitor. The correlator ignores log statement output of log statements with identifiers of INFO or DEBUG. But then there are some problems. You use the engine_management correlator utility to change the log level to DEBUG. Now the correlator sends output from all log statements to the appropriate log file.
Following is another example:
log "Log statement number " + logNo() at DEBUG;
action logNo() {
   logNumber := logNumber + 1;
   return logNumber.toString();
In this example, the correlator always executes the log statement because it calls an action. However, the log level in effect must be DEBUG for the correlator to send the string to the log file. If the log level is anything else, the correlator discards the string because the log level in effect is lower than the log level in the log statement.

Copyright © 2013-2018 | Software AG, Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.