Show TOC

Log File Input AdapterLocate this document in the navigation structure

The SAP Event Stream Processor Log File Input adapter reads from a log file and sends data to ESP input streams or windows.

For each log record read from the file, the adapter sends one row (message) to the stream or window. The log file can be in any of these formats:
  • Common log format
  • Combined log format
  • Extended common log format

The choice of formats allows you to read log files from Apache, Tomcat, IIS, and other datasources that write their log files in one of these formats. You can customize the appropriate .properties file to read the log files in other formats.

This adapter is written in Java and uses JavaBeans. SAP assumes, if you use this adapter, that you have extensive knowledge and experience with JavaBeans and .properties files.

You can use this adapter to read either live or historical log files. Historical files are complete and can be read once from beginning to end. Live files are those to which data continues to be added.

There are two types of live files, rotating and advancing. For rotating files, when the log file is full, the program that writes to the file renames the existing file and starts a new file with the original name. Typically the new file name is based on the original file name with a suffix appended, for example, if the original file name is "access.log", the renamed files are "access.log.1", "access.log.2", and so on. The Log File Input adapter always reads the original file name. The adapter starts over at the beginning when the old file has been renamed and a new one created.

For advancing files, when one file is full, the log file writer creates a new file and starts writing to that new file. The naming convention is typically a base name plus a suffix, where the suffix might be based on date/time or a sequential number (for example, "access-log.2007-01-01", "access-log.2007-01-02", and so on, or "access.log.1", "access.log.2", and so on). Regardless of the naming convention, the adapter opens these log files in chronological order by the most recent modification date.