Return-Path: X-Original-To: apmail-logging-log4j-user-archive@www.apache.org Delivered-To: apmail-logging-log4j-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 3DD6CD984 for ; Wed, 27 Feb 2013 21:39:15 +0000 (UTC) Received: (qmail 24542 invoked by uid 500); 27 Feb 2013 21:39:14 -0000 Delivered-To: apmail-logging-log4j-user-archive@logging.apache.org Received: (qmail 24489 invoked by uid 500); 27 Feb 2013 21:39:14 -0000 Mailing-List: contact log4j-user-help@logging.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Log4J Users List" Reply-To: "Log4J Users List" Delivered-To: mailing list log4j-user@logging.apache.org Received: (qmail 24480 invoked by uid 99); 27 Feb 2013 21:39:14 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 27 Feb 2013 21:39:14 +0000 X-ASF-Spam-Status: No, hits=2.7 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_REPLY,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of ynerella999@gmail.com designates 209.85.160.52 as permitted sender) Received: from [209.85.160.52] (HELO mail-pb0-f52.google.com) (209.85.160.52) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 27 Feb 2013 21:39:05 +0000 Received: by mail-pb0-f52.google.com with SMTP id ma3so626059pbc.11 for ; Wed, 27 Feb 2013 13:38:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:content-type; bh=J62PterytqYpreQZkVyrtkApMnSYdHQtUOsaQJChGEA=; b=jLMswEqGDxHMa3A0TRzsYvfiOvSkR1qoSG+/UCx1QCx5P1azqKBSOzbN7RHyLUJhRy 6OA9oEr6MvG8DjZUAi6r6By93OYsQlF4huMdRUSGAhB8JycKE5tF7iQ5b83zeoPbWBx9 XlCsjSxwUrJ5nKQVEz8KQhWTwSAxSTRdNpMkkE+WjrIYMXcXIeWh4vkbG++ZTL6JzSNe ZKHzOVqclQ0BsDcQyy3JqmSpVY3Pbv2HFg7YzbDaY26k0ulHRSTti2vtfczD5MEjh6YI iZ1DCoFLQ7rAr2BG4KtCjpwSbXC1NtRkw3BeVJ+iWdTc7XXZRjCWVYiRq5hIZvkn6Cxn C/qg== MIME-Version: 1.0 X-Received: by 10.66.219.8 with SMTP id pk8mr9767885pac.92.1362001123728; Wed, 27 Feb 2013 13:38:43 -0800 (PST) Received: by 10.68.229.134 with HTTP; Wed, 27 Feb 2013 13:38:43 -0800 (PST) In-Reply-To: References: <25FDAD35-3E03-4BD6-926F-531A58DD5A34@dslextreme.com> <08577A5D-7F45-45C8-BA36-9DC14ABDFE88@dslextreme.com> <6BE89EAF-5F34-47E3-B675-904580A61400@dslextreme.com> Date: Wed, 27 Feb 2013 13:38:43 -0800 Message-ID: Subject: Re: Any tools to convert log messages to log events From: Yogi Nerella To: Log4J Users List Content-Type: multipart/alternative; boundary=047d7b5db8c429e56d04d6bb99c0 X-Virus-Checked: Checked by ClamAV on apache.org --047d7b5db8c429e56d04d6bb99c0 Content-Type: text/plain; charset=ISO-8859-1 Scott, This code is failing with NullPointerException for the doPost() method. I get the NullPointerException even when static initialization of the following code is done. private static final LoggerRepositoryExImpl repositoryExImpl = new LoggerRepositoryExImpl(LogManager.getLoggerRepository()); I think we have to set LoggerRepositoryExImpl this as the new rootRepository(), but I do not know what API to use. the only other api I can use is doConfigure(entity, repository); Our application do not have contexts in all the threads some threads add context (aaa), some add both (aaa & bbb). I would like to report the errors pointing out which context is missing. Also, some log files are using the date pattern that ends with a "dot.sss" and some with "comma,sss", and these lines are also ending up with no match, would like to report the error properly. I was interested in log4j2 on the appender side only, so I can try and see if it is working ok. Thanks, Yogi On Wed, Feb 27, 2013 at 1:08 PM, Scott Deboy wrote: > I posted this in an earlier reply, but along with the declaration of the > repositoryselector from my previous email, do this: > > VFSLogFilePatternReceiver receiver = new VFSLogFilePatternReceiver(); > receiver.setAppendNonMatches(true); > receiver.setFileURL(info.getPropertyString("fileURI")); > > receiver.setLogFormat(LogFilePatternLayoutBuilder.getLogFormatFromPatternLayout(info.getPropertyString("format"))); > > receiver.setTimestampFormat(LogFilePatternLayoutBuilder.getTimeStampFormat(info.getPropertyString("format"))); > receiver.setName(name + "-receiver"); > receiver.activateOptions(); > > That should do it.. > > Yes, it's trying to match the whole line...and the 'appendnonmatches' means > you'll still get a loggingevent, but with the entire line in the 'message' > field with an 'Unknown' logger. > > Are you saying LogFilePatternReceiver regexp logic is not matching the > entry when aaa or bbb are empty strings? If so, I'd hope that'd be a bug we > could fix.. > > I'm not sure on the receiver side how you could use log4j2..it is coded > against log4j 1.2.x...you can use log4j2 on the appender side - this > receiver doesn't care where the log file came from (could be another > logging framework of course). > > You're welcome! > > Scott > > > > On Wed, Feb 27, 2013 at 12:51 PM, Yogi Nerella >wrote: > > > Scott, > > > > Thanks for pointing, I am now able to parse the log file and generate the > > events. > > > > I have couple of question for you. > > > > How do I configure log4j plugin via java code, instead of loading from an > > xml file? > > When the data matches partially with the regex, can the error message > > indicate upto what pattern it matched, and what is missing? > > %p %t %l %d aaa=%X{aaa} bbb=%X{bbb} %m > > > > If the data is missing aaa, can it report that, or if the datetime is not > > in the order it expected. > > > > Current program is constructing one big regular expression and doing a > > match, may be it should do is keyword by keyword and report at the first > > failure. > > > > Another question is How do I use this with log4j2, can I remove > log4j1.2.16 > > jar and then use log4j binding of 2.0 module? > > > > Appreciate your help, > > Yogi > > > > > > > > On Tue, Feb 26, 2013 at 3:33 PM, Scott Deboy > > wrote: > > > > > Chainsaw does this: > > > > > > private static final LoggerRepositoryExImpl repositoryExImpl = new > > > LoggerRepositoryExImpl(LogManager.getLoggerRepository()); > > > > > > Which I think you also need to do prior to calling activateOptions on > the > > > receiver.. > > > > > > Scott > > > > > > On Tue, Feb 26, 2013 at 2:52 PM, Yogi Nerella > > > wrote: > > > > > > > Hi Scott, > > > > > > > > After I got download the jar files from your repository, I run into > > > > NullPointerException? > > > > > > > > doPost() > > > > Logger localLogger = > > > > > getLoggerRepository().getLogger(event.getLoggerName()); > > > > > > > > > > > > getLoggerRepository() is returning null? What am I doing wrong? > > > > > > > > I am attaching the java code I am using and the log4j.xml file. > > > > > > > > Thanks > > > > Yogi > > > > > > > > > > > > > > > > > > > > > > > > On Tue, Feb 26, 2013 at 11:19 AM, Scott Deboy > > >wrote: > > > > > > > >> Yikes!!! > > > >> > > > >> Thanks for pointing this out.. > > > >> > > > >> I'll send an email to the dev list, hopefully someone will know how > to > > > >> resolve it. > > > >> > > > >> Scott > > > >> > > > >> > > > >> On Tue, Feb 26, 2013 at 11:09 AM, Yogi Nerella < > ynerella999@gmail.com > > > >> >wrote: > > > >> > > > >> > Scott, > > > >> > > > > >> > first of all, I would like to appreciate your time. > > > >> > > > > >> > None of the mirrors has this zip file available. I have tried > > > probably > > > >> 10 > > > >> > of them. > > > >> > > > > >> > Downloaded source code from SVN REPOSITORY, but it fails in tests. > > > >> > Failed tests: > > > >> testLocationInfo(org.apache.log4j.xml.XSLTLayoutTestCase) > > > >> > testBasic(org.apache.log4j.xml.XSLTLayoutTestCase) > > > >> > testCDATA(org.apache.log4j.xml.XSLTLayoutTestCase) > > > >> > testNull(org.apache.log4j.xml.XSLTLayoutTestCase) > > > >> > > > > >> > > > > >> > All these mirrors do not have the file. But archive repository > has > > > >> it, so > > > >> > I downloaded it. > > > >> > > > > >> > > > > >> > > > > >> > > > > > > http://www.apache.org/dyn/closer.cgi/logging/log4j/companions/extras/1.1/apache-log4j-extras-1.1.tar.gz > > > >> > > > > >> > * > > > >> > > > > >> > > > > >> > > > > > > http://www.globalish.com/am/logging/log4j/companions/extras/1.1/apache-log4j-extras-1.1.tar.gz > > > >> > *< > > > >> > > > > >> > > > > > > http://www.globalish.com/am/logging/log4j/companions/extras/1.1/apache-log4j-extras-1.1.tar.gz > > > >> > > > > > >> > > > > >> > > > > >> > * > > > >> > > > > >> > > > > >> > > > > > > http://apache.mirrors.lucidnetworks.net/logging/log4j/companions/extras/1.1/apache-log4j-extras-1.1.tar.gz > > > >> > *< > > > >> > > > > >> > > > > > > http://apache.mirrors.lucidnetworks.net/logging/log4j/companions/extras/1.1/apache-log4j-extras-1.1.tar.gz > > > >> > > > > > >> > > > > >> > > > > >> > * > > > >> > > > > >> > > > > >> > > > > > > http://www.carfab.com/apachesoftware/logging/log4j/companions/extras/1.1/apache-log4j-extras-1.1.tar.gz > > > >> > *< > > > >> > > > > >> > > > > > > http://www.carfab.com/apachesoftware/logging/log4j/companions/extras/1.1/apache-log4j-extras-1.1.tar.gz > > > >> > > > > > >> > > > > >> > > > > >> > * > > > >> > > > > >> > > > > >> > > > > > > http://apache.tradebit.com/pub/logging/log4j/companions/extras/1.1/apache-log4j-extras-1.1.tar.gz > > > >> > *< > > > >> > > > > >> > > > > > > http://apache.tradebit.com/pub/logging/log4j/companions/extras/1.1/apache-log4j-extras-1.1.tar.gz > > > >> > > > > > >> > > > > >> > > > > >> > * > > > >> > > > > >> > > > > >> > > > > > > http://apache.mirrors.hoobly.com/logging/log4j/companions/extras/1.1/apache-log4j-extras-1.1.tar.gz > > > >> > *< > > > >> > > > > >> > > > > > > http://apache.mirrors.hoobly.com/logging/log4j/companions/extras/1.1/apache-log4j-extras-1.1.tar.gz > > > >> > > > > > >> > > > > >> > > > > >> > * > > > >> > > > > >> > > > > >> > > > > > > http://mirror.olnevhost.net/pub/apache/logging/log4j/companions/extras/1.1/apache-log4j-extras-1.1.tar.gz > > > >> > *< > > > >> > > > > >> > > > > > > http://mirror.olnevhost.net/pub/apache/logging/log4j/companions/extras/1.1/apache-log4j-extras-1.1.tar.gz > > > >> > > > > > >> > > > > >> > > > > >> > * > > > >> > > > > >> > > > > >> > > > > > > http://download.nextag.com/apache/logging/log4j/companions/extras/1.1/apache-log4j-extras-1.1.tar.gz > > > >> > *< > > > >> > > > > >> > > > > > > http://download.nextag.com/apache/logging/log4j/companions/extras/1.1/apache-log4j-extras-1.1.tar.gz > > > >> > > > > > >> > > > > >> > > > > >> > * > > > >> > > > > >> > > > > >> > > > > > > http://www.eng.lsu.edu/mirrors/apache/logging/log4j/companions/extras/1.1/apache-log4j-extras-1.1.tar.gz > > > >> > *< > > > >> > > > > >> > > > > > > http://www.eng.lsu.edu/mirrors/apache/logging/log4j/companions/extras/1.1/apache-log4j-extras-1.1.tar.gz > > > >> > > > > > >> > > > > >> > > > > >> > * > > > >> > > > > >> > > > > >> > > > > > > http://www.trieuvan.com/apache/logging/log4j/companions/extras/1.1/apache-log4j-extras-1.1.tar.gz > > > >> > *< > > > >> > > > > >> > > > > > > http://www.trieuvan.com/apache/logging/log4j/companions/extras/1.1/apache-log4j-extras-1.1.tar.gz > > > >> > > > > > >> > > > > >> > > > > >> > * > > > >> > > > > >> > > > > >> > > > > > > http://www.fightrice.com/mirrors/apache/logging/log4j/companions/extras/1.1/apache-log4j-extras-1.1.tar.gz > > > >> > *< > > > >> > > > > >> > > > > > > http://www.fightrice.com/mirrors/apache/logging/log4j/companions/extras/1.1/apache-log4j-extras-1.1.tar.gz > > > >> > > > > > >> > > > > >> > > > > >> > * > > > >> > > > > >> > > > > >> > > > > > > http://mirror.reverse.net/pub/apache/logging/log4j/companions/extras/1.1/apache-log4j-extras-1.1.tar.gz > > > >> > *< > > > >> > > > > >> > > > > > > http://mirror.reverse.net/pub/apache/logging/log4j/companions/extras/1.1/apache-log4j-extras-1.1.tar.gz > > > >> > > > > > >> > > > > >> > > > > >> > * > > > >> > > > > >> > > > > >> > > > > > > http://apache.mirrors.pair.com/logging/log4j/companions/extras/1.1/apache-log4j-extras-1.1.tar.gz > > > >> > *< > > > >> > > > > >> > > > > > > http://apache.mirrors.pair.com/logging/log4j/companions/extras/1.1/apache-log4j-extras-1.1.tar.gz > > > >> > > > > > >> > > > > >> > > > > >> > Yogi > > > >> > > > > >> > > > > >> > On Tue, Feb 26, 2013 at 10:38 AM, Scott Deboy < > > scott.deboy@gmail.com> > > > >> > wrote: > > > >> > > > > >> > > Err left hand side :) > > > >> > > > > > >> > > > > > >> > > On Tue, Feb 26, 2013 at 10:38 AM, Scott Deboy < > > > scott.deboy@gmail.com> > > > >> > > wrote: > > > >> > > > > > >> > > > The link I referenced: > > > >> > > > http://logging.apache.org/log4j/companions/extras/ > > > >> > > > > > > >> > > > Has a 'download' link on the right hand side. > > > >> > > > > > > >> > > > Scott > > > >> > > > > > > >> > > > > > > >> > > > On Tue, Feb 26, 2013 at 10:17 AM, Yogi Nerella < > > > >> ynerella999@gmail.com > > > >> > > >wrote: > > > >> > > > > > > >> > > >> Scott, > > > >> > > >> > > > >> > > >> None of the apache sites has extras available for download? > > > >> > > >> > > > >> > > >> Yogi > > > >> > > >> > > > >> > > >> > > > >> > > >> On Mon, Feb 25, 2013 at 9:41 PM, Scott Deboy < > > > >> scott.deboy@gmail.com> > > > >> > > >> wrote: > > > >> > > >> > > > >> > > >> > Maybe you are hitting a typo? It's > VFSLogFilePatternReceiver > > > >> (not > > > >> > > >> > VSLogFilePatternReceiver) and can be found in the Chainsaw > > > >> binaries. > > > >> > > >> I'd > > > >> > > >> > suggest pulling down the latest developer snapshot at > > > >> > > >> > http://people.apache.org/~sdeboy > > > >> > > >> > > > > >> > > >> > Also, the OptionHandler class is a part of the log4j extras > > > >> > companion > > > >> > > >> > release ( > http://logging.apache.org/log4j/companions/extras/) > > > >> > > >> > > > > >> > > >> > Scott > > > >> > > >> > > > > >> > > >> > > > > >> > > >> > > > > >> > > >> > > > > >> > > >> > On Mon, Feb 25, 2013 at 6:00 PM, Yogi Nerella < > > > >> > ynerella999@gmail.com> > > > >> > > >> > wrote: > > > >> > > >> > > > > >> > > >> > > Hi Scott, > > > >> > > >> > > > > > >> > > >> > > Running into several issues. > > > >> > > >> > > > > > >> > > >> > > 1. VSLogFilePatternReceiver is not found in the chainsaw > > > >> binaries. > > > >> > > >> Only > > > >> > > >> > > source code has this. > > > >> > > >> > > > > > >> > > >> > > 2. Downloaded source code and built, this is missing > > > >> > > >> > > org.apache.log4j.spi.OptionHandler > > > >> > > >> > > > > > >> > > >> > > Can you point me the correct place where I can download > the > > > >> > > chainsaw. > > > >> > > >> > > > > > >> > > >> > > Thanks > > > >> > > >> > > Yogi > > > >> > > >> > > > > > >> > > >> > > > > > >> > > >> > > > > > >> > > >> > > > > > >> > > >> > > On Sat, Feb 23, 2013 at 8:51 AM, Scott Deboy < > > > >> > scott.deboy@gmail.com > > > >> > > > > > > >> > > >> > > wrote: > > > >> > > >> > > > > > >> > > >> > > > Yes, I would suggest adding non-space delimiters > between > > > >> fields > > > >> > > >> > (dashes) > > > >> > > >> > > or > > > >> > > >> > > > around fields (square brackets)... > > > >> > > >> > > > > > > >> > > >> > > > > > > >> > > >> > > > On Sat, Feb 23, 2013 at 8:05 AM, Tech Mail < > > > >> > ynerella999@gmail.com > > > >> > > > > > > >> > > >> > > wrote: > > > >> > > >> > > > > > > >> > > >> > > > > Thank you Ralph, Scott, > > > >> > > >> > > > > > > > >> > > >> > > > > Can (VFS)LogFilePatternReceiver this class be > improved > > to > > > >> > accept > > > >> > > >> > > pattern > > > >> > > >> > > > > layout string as log format? So that there is no > error > > > in > > > >> > > >> manually > > > >> > > >> > > > > changing the format? > > > >> > > >> > > > > > > > >> > > >> > > > > Also how does the headers, fields constructed back if > > the > > > >> data > > > >> > > >> itself > > > >> > > >> > > has > > > >> > > >> > > > > the field separators. > > > >> > > >> > > > > > > > >> > > >> > > > > Is there any field terminator I can provide in > pattern > > > >> layout > > > >> > > >> instead > > > >> > > >> > > of > > > >> > > >> > > > > space? Some times MDC context is empty and some > times > > > >> data in > > > >> > > MDC > > > >> > > >> > > > context > > > >> > > >> > > > > has spaces which when reconstructed the fields has > > wrong > > > >> data. > > > >> > > >> How > > > >> > > >> > do > > > >> > > >> > > I > > > >> > > >> > > > > handle this? > > > >> > > >> > > > > > > > >> > > >> > > > > Thanks, > > > >> > > >> > > > > Yogi > > > >> > > >> > > > > > > > >> > > >> > > > > On Feb 22, 2013, at 11:42 PM, Ralph Goers < > > > >> > > >> > ralph.goers@dslextreme.com> > > > >> > > >> > > > > wrote: > > > >> > > >> > > > > > > > >> > > >> > > > > > I think you are mistaken on the number of Appenders > > > that > > > >> are > > > >> > > >> > missing. > > > >> > > >> > > > > > > > > >> > > >> > > > > > Log4j 2 does have a SocketAppender. It supports > both > > > TCP > > > >> and > > > >> > > UDP > > > >> > > >> > and > > > >> > > >> > > > > accepts a Layout to allow whatever is sent to be > > > formatted > > > >> any > > > >> > > way > > > >> > > >> > you > > > >> > > >> > > > > want. The existing SocketServer expects a serialized > > > >> event. > > > >> > The > > > >> > > >> > > > XMLLayout > > > >> > > >> > > > > could be used instead. In fact, the SyslogAppender > > just > > > >> > extends > > > >> > > >> the > > > >> > > >> > > > > SocketAppender and hard codes the layout to match > > either > > > >> the > > > >> > BSD > > > >> > > >> or > > > >> > > >> > RFC > > > >> > > >> > > > > 5424 syslog layout. > > > >> > > >> > > > > > > > > >> > > >> > > > > > There are both a JMSTopicAppender and a > > > JMSQueueAppender. > > > >> > > There > > > >> > > >> is > > > >> > > >> > a > > > >> > > >> > > > > Receiver for each, although they probably don't > conform > > > to > > > >> > what > > > >> > > >> you > > > >> > > >> > > would > > > >> > > >> > > > > want. > > > >> > > >> > > > > > > > > >> > > >> > > > > > Of course there is a FileAppender that accepts any > > > >> layout. > > > >> > > >> There is > > > >> > > >> > > no > > > >> > > >> > > > > Receiver. > > > >> > > >> > > > > > > > > >> > > >> > > > > > You are correct that there is currently not a > > > DBAppender > > > >> or > > > >> > > >> > Receiver. > > > >> > > >> > > > > > > > > >> > > >> > > > > > I don't know what it means to say Log4j 2 doesn't > > have > > > >> > > non-Log4j > > > >> > > >> > 1.x > > > >> > > >> > > > > appenders. > > > >> > > >> > > > > > > > > >> > > >> > > > > > When I started working on Log4j 2 I don't recall > any > > of > > > >> the > > > >> > > >> > receivers > > > >> > > >> > > > > being part of the codebase but in some companion > > layer. I > > > >> have > > > >> > > no > > > >> > > >> > > problem > > > >> > > >> > > > > with having them being added. > > > >> > > >> > > > > > > > > >> > > >> > > > > > If you really feel something is missing you are > > welcome > > > >> to > > > >> > > >> commit > > > >> > > >> > it. > > > >> > > >> > > > > > > > > >> > > >> > > > > > Ralph > > > >> > > >> > > > > > > > > >> > > >> > > > > > On Feb 22, 2013, at 4:58 PM, Scott Deboy wrote: > > > >> > > >> > > > > > > > > >> > > >> > > > > >> I forgot the two main socket appenders of course: > > > >> > > >> > > > > >> SocketAppender -> SocketReceiver > > > >> > > >> > > > > >> SocketHubAppender -> SocketHubReceiver (allow > > > >> > > reverse-connects > > > >> > > >> > from > > > >> > > >> > > > the > > > >> > > >> > > > > >> 'receiver' to the 'appender') > > > >> > > >> > > > > >> > > > >> > > >> > > > > >> > > > >> > > >> > > > > >> On Fri, Feb 22, 2013 at 4:51 PM, Scott Deboy < > > > >> > > >> > scott.deboy@gmail.com > > > >> > > >> > > > > > > >> > > >> > > > > wrote: > > > >> > > >> > > > > >> > > > >> > > >> > > > > >>> There are quite a few appenders and associated > > > >> receivers > > > >> > in > > > >> > > >> log4j > > > >> > > >> > > > 1.x. > > > >> > > >> > > > > >>> Most of these appenders and all of these > receivers > > > are > > > >> > > >> missing in > > > >> > > >> > > > > log4j2: > > > >> > > >> > > > > >>> > > > >> > > >> > > > > >>> MulticastAppender->MulticastReceiver > > > >> > > >> > > > > >>> UDPAppender and non-log4j appenders which support > > > >> > generating > > > >> > > >> > events > > > >> > > >> > > > > over > > > >> > > >> > > > > >>> UDP which conform to log4j's dtd (log4net, > > > >> > etc)->UDPReceiver > > > >> > > >> > > > > >>> *FileAppender with a regular text > > > >> > > >> > > layout->(VFS)LogFilePatternReceiver > > > >> > > >> > > > > >>> *FileAppender with an xml > > layout->LogFileXMLReceiver > > > >> > > >> > > > > >>> non-log4j appenders which support generating > events > > > >> over > > > >> > TCP > > > >> > > >> > which > > > >> > > >> > > > > conform > > > >> > > >> > > > > >>> to log4j's dtd (log4perl, etc)->XMLSocketReceiver > > > >> > > >> > > > > >>> JMSAppender->JMSReceiver > > > >> > > >> > > > > >>> DBAppender->DBReceiver (DBAppender uses a > > predefined > > > >> > schema) > > > >> > > >> > > > > >>> Custom DB definition->CustomSQLDBReceiver > > > >> > > >> > > > > >>> > > > >> > > >> > > > > >>> There may be others, those are the ones I can > > > remember > > > >> off > > > >> > > the > > > >> > > >> > top > > > >> > > >> > > of > > > >> > > >> > > > > my > > > >> > > >> > > > > >>> head. > > > >> > > >> > > > > >>> > > > >> > > >> > > > > >>> Scott > > > >> > > >> > > > > >>> > > > >> > > >> > > > > >>> > > > >> > > >> > > > > >>> On Fri, Feb 22, 2013 at 4:44 PM, Scott Deboy < > > > >> > > >> > > scott.deboy@gmail.com > > > >> > > >> > > > > >wrote: > > > >> > > >> > > > > >>> > > > >> > > >> > > > > >>>> In log4j1.x, yes, receivers can be configured > via > > > the > > > >> > > >> 'plugin' > > > >> > > >> > > > > element in > > > >> > > >> > > > > >>>> log4j.xml and eventually end up appending > received > > > >> events > > > >> > > to > > > >> > > >> the > > > >> > > >> > > > local > > > >> > > >> > > > > >>>> log4j system, which are then picked up by > locally > > > >> defined > > > >> > > >> > > appenders. > > > >> > > >> > > > > This > > > >> > > >> > > > > >>>> is how Chainsaw works - it programmatically > > > registers > > > >> its > > > >> > > own > > > >> > > >> > > > > appender to > > > >> > > >> > > > > >>>> pull in events appended by the configured > > receivers. > > > >> > > >> > > > > >>>> > > > >> > > >> > > > > >>>> > > > >> > > >> > > > > >>>> > > > >> > > >> > > > > >>>> > > > >> > > >> > > > > >>>> > > > >> > > >> > > > > >>>> On Fri, Feb 22, 2013 at 4:37 PM, Ralph Goers < > > > >> > > >> > > > > ralph.goers@dslextreme.com>wrote: > > > >> > > >> > > > > >>>> > > > >> > > >> > > > > >>>>> Not in the configuration as yet. However, > I've > > > >> > > >> implemented a > > > >> > > >> > > > > couple of > > > >> > > >> > > > > >>>>> "servers" that are independent "main programs" > > that > > > >> can > > > >> > > >> receive > > > >> > > >> > > log > > > >> > > >> > > > > events. > > > >> > > >> > > > > >>>>> I am assuming that the main difference is that > > the > > > >> > > receiver > > > >> > > >> > would > > > >> > > >> > > > > not be a > > > >> > > >> > > > > >>>>> main but would be embedded in the application. > > > >> > > >> > > > > >>>>> > > > >> > > >> > > > > >>>>> Where are they documented? > > > >> > > >> > > > > >>>>> > > > >> > > >> > > > > >>>>> Ralph > > > >> > > >> > > > > >>>>> > > > >> > > >> > > > > >>>>> > > > >> > > >> > > > > >>>>> On Feb 22, 2013, at 3:51 PM, Scott Deboy wrote: > > > >> > > >> > > > > >>>>> > > > >> > > >> > > > > >>>>>> Log4j2 has no concept of receivers, correct? > > > >> > > >> > > > > >>>>>> > > > >> > > >> > > > > >>>>>> > > > >> > > >> > > > > >>>>>> On Fri, Feb 22, 2013 at 3:39 PM, Ralph Goers < > > > >> > > >> > > > > >>>>> ralph.goers@dslextreme.com>wrote: > > > >> > > >> > > > > >>>>>> > > > >> > > >> > > > > >>>>>>> Scott, > > > >> > > >> > > > > >>>>>>> > > > >> > > >> > > > > >>>>>>> Yogi has been asking other questions about > > Log4j > > > 2 > > > >> so > > > >> > > I'm > > > >> > > >> not > > > >> > > >> > > > clear > > > >> > > >> > > > > >>>>> if his > > > >> > > >> > > > > >>>>>>> question applies to that or 1.x. Or does the > > > >> > > >> > > > > >>>>> VFSLogFilePatternReceiver > > > >> > > >> > > > > >>>>>>> work with Log4j 2? > > > >> > > >> > > > > >>>>>>> > > > >> > > >> > > > > >>>>>>> Ralph > > > >> > > >> > > > > >>>>>>> > > > >> > > >> > > > > >>>>>>> > > > >> > > >> > > > > >>>>>>> On Feb 22, 2013, at 3:32 PM, Scott Deboy > wrote: > > > >> > > >> > > > > >>>>>>> > > > >> > > >> > > > > >>>>>>>> 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 > > < > > > >> > > >> > > > > ynerella999@gmail.com > > > >> > > >> > > > > >>>>>> > > > >> > > >> > > > > >>>>>>> wrote: > > > >> > > >> > > > > >>>>>>>> > > > >> > > >> > > > > >>>>>>>>> Hi, > > > >> > > >> > > > > >>>>>>>>> > > > >> > > >> > > > > >>>>>>>>> Any tools which can take a log file and the > > > >> pattern > > > >> > > >> string > > > >> > > >> > > and > > > >> > > >> > > > > >>>>> generate > > > >> > > >> > > > > >>>>>>> the > > > >> > > >> > > > > >>>>>>>>> events? > > > >> > > >> > > > > >>>>>>>>> > > > >> > > >> > > > > >>>>>>>>> Thanks > > > >> > > >> > > > > >>>>>>>>> Yogi > > > >> > > >> > > > > >>>>>>> > > > >> > > >> > > > > >>>>>>> > > > >> > > >> > > > > >>>>>>> > > > >> > > >> > > > > > > > >> > > >> > > > >> > --------------------------------------------------------------------- > > > >> > > >> > > > > >>>>>>> To unsubscribe, e-mail: > > > >> > > >> > > > log4j-user-unsubscribe@logging.apache.org > > > >> > > >> > > > > >>>>>>> For additional commands, e-mail: > > > >> > > >> > > > > log4j-user-help@logging.apache.org > > > >> > > >> > > > > >>>>> > > > >> > > >> > > > > >>>>> > > > >> > > >> > > > > >>>>> > > > >> > > >> > > > > > > >> > > >> > > > >> > --------------------------------------------------------------------- > > > >> > > >> > > > > >>>>> To unsubscribe, e-mail: > > > >> > > >> > > log4j-user-unsubscribe@logging.apache.org > > > >> > > >> > > > > >>>>> For additional commands, e-mail: > > > >> > > >> > > > log4j-user-help@logging.apache.org > > > >> > > >> > > > > > > > > >> > > >> > > > > > > > > >> > > >> > > > > > > > > >> > > >> > > > > >> > > > --------------------------------------------------------------------- > > > >> > > >> > > > > > To unsubscribe, e-mail: > > > >> > > >> log4j-user-unsubscribe@logging.apache.org > > > >> > > >> > > > > > For additional commands, e-mail: > > > >> > > >> > log4j-user-help@logging.apache.org > > > >> > > >> > > > > > > > > >> > > >> > > > > > > > >> > > >> > > > > > > > >> > > >> > > > >> > --------------------------------------------------------------------- > > > >> > > >> > > > > To unsubscribe, e-mail: > > > >> > > log4j-user-unsubscribe@logging.apache.org > > > >> > > >> > > > > For additional commands, e-mail: > > > >> > > >> log4j-user-help@logging.apache.org > > > >> > > >> > > > > > > > >> > > >> > > > > > > > >> > > >> > > > > > > >> > > >> > > > > > >> > > >> > > > > >> > > >> > > > >> > > > > > > >> > > > > > > >> > > > > > >> > > > > >> > > > > > > > > > > > > > > > > --------------------------------------------------------------------- > > > > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org > > > > For additional commands, e-mail: log4j-user-help@logging.apache.org > > > > > > > > > > --047d7b5db8c429e56d04d6bb99c0--