Developing Apama Applications > Apama EPL Reference > Statements > Simple statements > The log statement
The log statement
The log statement writes messages and accompanying date and time information to the correlator’s log file, if one was specified when the correlator was started.
LogStatement
If there is no log file, then the message is written to the correlator’s standard output stream stdout.
LogLevel
The Expression result must be of type string. The value is written only if the current logging level in effect is a priority equal to or higher than the logLevel specified in the log statement, with the exception of OFF. If you do not specify a level, CRIT, the highest priority level, is used. At a logLevel equal to OFF, only logs explicitly set to this level will be written. For details, see Logging and printing in Developing Apama Applications in EPL.
Example
For example:
log "Your message here" at INFO;
This EPL statement produces a log message that looks like this:
2010-07-11 09:08:49.200 INFO [3716] - MyMonitor[1] Your message here
Copyright © 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.
Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG.