Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved


Chapter 3 Platform-Independent Microagents and Methods : COM.TIBCO.hawk.microagent.Logfile

COM.TIBCO.hawk.microagent.Logfile
Microagent
Purpose
The Logfile microagent (on all platforms) monitors the contents of log files. It has only one method: onNewLine. When used as a data source in a rule, the onNewLine method monitors growing log files and provides each new line as a new data element for testing. The Logfile microagent can process rolling log files, and so it continues to monitor the correct data stream even when log files roll over.
The Logfile microagent assumes that the file being monitored is a constantly growing log file with all new data appended at the end. If it detects that a file has decreased in size, it assumes that the file has been overwritten (or rolled) and begins monitoring the new file from the beginning.
When the Logfile microagent is first directed to monitor a particular log file (such as when you first load a rulebase that uses it), monitoring begins from the end of the file. In other words, only new lines are reported and any lines that existed in the file before monitoring was initiated are ignored.
Methods
 

Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved