If you want the events to end up in log4j (being processed by an appender,
it's very easy, just define a (VFS)LogFilePatternReceiver in your log4j
configuration file.

If you instead want the LogEvents so you can do something else with them,
you can use the (VFS)LogFilePatternReceiver outside of log4j, just
construct it, call appropriate setters, and call activateOptions.  Wherever
the receiver calls doPost, you can instead hold on to the generated event.

http://svn.apache.org/repos/asf/logging/chainsaw/trunk/src/main/java/org/apache/log4j/varia/LogFilePatternReceiver.java

The VFS version supports Commons-VFS sources (sftp, etc):
http://svn.apache.org/repos/asf/logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/vfs/VFSLogFilePatternReceiver.java

Scott


On Fri, Feb 22, 2013 at 2:23 PM, Yogi Nerella <ynerella...@gmail.com> wrote:

> Hi,
>
> Any tools which can take a log file and the pattern string and generate the
> events?
>
> Thanks
> Yogi
>

Reply via email to