Re: problem using Chainsaw, "found non matching line"

2010-07-26 Thread Scott Deboy
I've committed a fix to the regexp building logic to correctly escape regexp
characters (including the pipe character) in svn 979552.

I've also uploaded a new chainsaw standalone.zip to
http://people.apache.org/~sdeboy/

I was able to parse a log file with your provided patternlayout using:

   
   

I also tested greater than and less than symbols as delimiters and they work
fine, but you have to use a layout which uses the encoded symbols in the xml
config file:

   

You may want to use org.apache.log4j.chainsaw.vfs.VFSLogFilePatternReceiver
instead - it more reliably tails, and can tail files using any of the file
systems supported by Jakarta Commons-VFS (including tailing over ssh).
Changing the receiver class name should be all you need to do to use it..

Let me know if the latest standalone zip file works for you.

Scott

On Mon, Jul 26, 2010 at 1:55 AM, Florian Boulay wrote:

> When using the format *[TIMESTAMP] **, the updated version of Chainsaw
> manages to parse 4 lines of my log file. The old version does not manage to
> do it.
> However the *** get a lot of lines ! It does not stop when it encounters a
> \r\n
>
> 2010/7/26 Florian Boulay 
>
> > Ok I answered to quickly. The updated version still parses my log file,
> but
> > it always display : "found non matching line:..."
> >
> > 2010/7/26 Florian Boulay 
> >
> > Hi,
> >>
> >> I tried the format [TIMESTAMP] [LEVEL] * LOGGER | MESSAGE with the
> >> official version of Chainsaw and the updated version found here :
> >> http://people.apache.org/~sdeboy/ <
> http://people.apache.org/%7Esdeboy/>and It did not work.
> >>
> >> On the updated version, nothing happen when choosing my chainsaw confg
> >> file. No error message in the tab "chainsaw-log". Sound like it did not
> >> parse any file. I also tried to delete all files in my .chainsaw
> directory,
> >> but it does not change the behavior of Chainsaw. Maybe I should try with
> a
> >> SocketAppender instead of loading a local file.
> >>
> >> 2010/7/26 Scott Deboy 
> >>
> >> Can you try
> >>> [TIMESTAMP] [LEVEL] * LOGGER | MESSAGE
> >>>
> >>> Also, try the updated version of Chainsaw when you have a chance and
> see
> >>> if that resolves your issue.
> >>>
> >>> Scott
> >>>
> >>>
> >>>
> >>>
> >>> On Jul 26, 2010, at 12:25 AM, Florian Boulay  >
> >>> wrote:
> >>>
> >>>  Hello,
> 
>  These two formats do not work :
>  - [TIMESTAMP] [LEVEL] user:[PROP(USER)] LOGGER | MESSAGE
>  - [TIMESTAMP] [LEVEL] user:[*] LOGGER | MESSAGE
> 
>  I am still searching the right format, I tried just '*' and it still
>  does
>  not work
> 
>  2010/7/23 Scott Deboy 
> 
>   Try:
> > [TIMESTAMP] [LEVEL] user:[PROP(USER)] LOGGER | MESSAGE
> >
> > Or, if you don't want the user property defined (you probably still
> > want
> > the
> > logger, yes?)
> > [TIMESTAMP] [LEVEL] user:[*] LOGGER | MESSAGE
> >
> >
> > On Fri, Jul 23, 2010 at 9:15 AM, Florian Boulay <
> > florian.bou...@gmail.com
> >
> >> wrote:
> >>
> >
> >  Hello,
> >>
> >> Since 2 days, I am trying to configure Chainsaw v2 for parsing my
> >> log4j
> >>
> > log
> >
> >> files, but it always returns "found non matching line...".
> >>
> >> Here is my log4j configuration :
> >>  >> class="org.apache.log4j.DailyRollingFileAppender">
> >> 
> >>  
> >>  
> >>  
> >> 
> >>
> >> And my Chainsaw configuration :
> >>  >> class="org.apache.log4j.varia.LogFilePatternReceiver">
> >>  
> >>  
> >>  
> >>  
> >>  
> >> 
> >>
> >> It does not work. I tried a lot of logFormat, but I do not manage to
> >> get
> >>
> > it
> >
> >> work. Can someone help me ?
> >>
> >> Thanks
> >>
> >>
> >
> >>> -
> >>> To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
> >>> For additional commands, e-mail: log4j-user-h...@logging.apache.org
> >>>
> >>>
> >>
> >
>


Re: problem using Chainsaw, "found non matching line"

2010-07-26 Thread Florian Boulay
When using the format *[TIMESTAMP] **, the updated version of Chainsaw
manages to parse 4 lines of my log file. The old version does not manage to
do it.
However the *** get a lot of lines ! It does not stop when it encounters a
\r\n

2010/7/26 Florian Boulay 

> Ok I answered to quickly. The updated version still parses my log file, but
> it always display : "found non matching line:..."
>
> 2010/7/26 Florian Boulay 
>
> Hi,
>>
>> I tried the format [TIMESTAMP] [LEVEL] * LOGGER | MESSAGE with the
>> official version of Chainsaw and the updated version found here :
>> http://people.apache.org/~sdeboy/ and 
>> It did not work.
>>
>> On the updated version, nothing happen when choosing my chainsaw confg
>> file. No error message in the tab "chainsaw-log". Sound like it did not
>> parse any file. I also tried to delete all files in my .chainsaw directory,
>> but it does not change the behavior of Chainsaw. Maybe I should try with a
>> SocketAppender instead of loading a local file.
>>
>> 2010/7/26 Scott Deboy 
>>
>> Can you try
>>> [TIMESTAMP] [LEVEL] * LOGGER | MESSAGE
>>>
>>> Also, try the updated version of Chainsaw when you have a chance and see
>>> if that resolves your issue.
>>>
>>> Scott
>>>
>>>
>>>
>>>
>>> On Jul 26, 2010, at 12:25 AM, Florian Boulay 
>>> wrote:
>>>
>>>  Hello,

 These two formats do not work :
 - [TIMESTAMP] [LEVEL] user:[PROP(USER)] LOGGER | MESSAGE
 - [TIMESTAMP] [LEVEL] user:[*] LOGGER | MESSAGE

 I am still searching the right format, I tried just '*' and it still
 does
 not work

 2010/7/23 Scott Deboy 

  Try:
> [TIMESTAMP] [LEVEL] user:[PROP(USER)] LOGGER | MESSAGE
>
> Or, if you don't want the user property defined (you probably still
> want
> the
> logger, yes?)
> [TIMESTAMP] [LEVEL] user:[*] LOGGER | MESSAGE
>
>
> On Fri, Jul 23, 2010 at 9:15 AM, Florian Boulay <
> florian.bou...@gmail.com
>
>> wrote:
>>
>
>  Hello,
>>
>> Since 2 days, I am trying to configure Chainsaw v2 for parsing my
>> log4j
>>
> log
>
>> files, but it always returns "found non matching line...".
>>
>> Here is my log4j configuration :
>> > class="org.apache.log4j.DailyRollingFileAppender">
>> 
>>  
>>  
>>  
>> 
>>
>> And my Chainsaw configuration :
>> > class="org.apache.log4j.varia.LogFilePatternReceiver">
>>  
>>  
>>  
>>  
>>  
>> 
>>
>> It does not work. I tried a lot of logFormat, but I do not manage to
>> get
>>
> it
>
>> work. Can someone help me ?
>>
>> Thanks
>>
>>
>
>>> -
>>> To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
>>> For additional commands, e-mail: log4j-user-h...@logging.apache.org
>>>
>>>
>>
>


RE: Cannot configure apache-log4j-extras-1.0 with apache-log4j-1 for time based log rotation

2010-07-26 Thread Saurabh Agrawal
Hi Jake.

Thanks for all your help. It's working now.

Saurabh
-Original Message-
From: Jacob Kjome [mailto:h...@visi.com] 
Sent: Wednesday, July 21, 2010 8:29 PM
To: Log4J Users List; saurabh.agra...@criticalpath.net
Subject: Re: Cannot configure apache-log4j-extras-1.0 with apache-log4j-1
for time based log rotation

On Wed, 21 Jul 2010 02:13:21 +0530
  "Saurabh Agrawal"  wrote:
> Thanks Jake.
> 
> Yes, I am running server in standalone mode (~/bin/startup.sh) [OS - 
> Linux/Solaris]. No IDE is being used.
> My application is deployed on tomcat server under ~/webapps/cp/.
> 
> I couldn't find my application specific pom.xml file, so I did update 
> the one present in log4j.jar. If that is not the correct way to do 
> this, can I use web.xml to define dependency?
> 

The instructions presume you are using Maven2 to perform your builds.
Apparently that is not the case for you.  Modifying pom.xml inside log4j.jar
will do you no good (nor harm).  It is totally inconsequential to your
issue.

Whatever build you are using (Ant?), make sure that it places the following
2 jars inside WEB-INF/lib of your WAR file (or directory)

~/webapps/cp/WEB-INF/lib/log4j.jar
~/webapps/cp/WEB-INF/lib/log4j-extras.jar

> Also, we are using ~/webapps/cp/WEB-INF/etc/log-conf.xml file to add 
> following configuration:
> 
>   name="access-log"
> class="org.apache.log4j.rolling.RollingFileAppender">  
>  WEB-INF/log-files/access.log  
>   class="org.apache.log4j.rolling.TimeBasedRollingPolicy">
> 
> WEB-INF/log-files/access.log.%d{-MM-dd}.log NamePa
> ttern> 
>   
>
> 

Like I mentioned before, this configuration looks like it is for Logback.  
Log4j doesn't support stuff like  and  elements.  The

link you originally provided gives you the correct configuration info

https://wiki.jasig.org/display/UPM30/log4j.xml

And that doc points to this doc, which provides the defacto information...


http://logging.apache.org/log4j/companions/extras/apidocs/org/apache/log4j/r
olling/TimeBasedRollingPolicy.html
> What I want is that a new log file should be created in the mid night, and
> logging should be continued in that file. Old log file should be renamed
> with access.log..

Read the above links.  They provide all the information you need.

Jake

> 
> Regards,
> Saurabh Agrawal
> 
> -Original Message-
>From: Jacob Kjome [mailto:h...@visi.com] 
> Sent: Tuesday, July 20, 2010 3:21 AM
> To: Log4J Users List; saurabh.agra...@criticalpath.net
> Subject: Re: Cannot configure apache-log4j-extras-1.0 with apache-log4j-1
> for time based log rotation
> 
> On Tue, 20 Jul 2010 00:57:48 +0530
>  "Saurabh Agrawal"  wrote:
>> Sorry, Jake. But I think you've missed the server name in my first email.
>> It's Apache Tomcat.
>> 
>> ***
>> Tomcat version: apache-tomcat-5.5.27
>> ***
> 
> Whoops.  I guess I did miss that.   That presents a problem, though. 
Tomcat
> uses child-first classloading by default, at least when running under the
> standalone scripts.
> 
> How are you running it?  Are you running it within an IDE or something?
> 
> Also, I took a closer look at your config.  It looks like Logback
> configuration, not Log4j configuration.  See here for config...
> 
>
http://logging.apache.org/log4j/companions/extras/apidocs/org/apache/log4j/r
> olling/RollingFileAppender.html
> 
> The config at the link you mentioned (
> https://wiki.jasig.org/display/UPM30/log4j.xml ) actually looks correct to
> me, but is different than what you mentioned below.
> 
> You also mention that you edited the pom.xml file in log4j.jar?  That's
not
> he pom file to edit.  The pom.xml to edit is your own pom.xml to contain
the
> dependency.
> 
> Please check the resultant WAR file to ensure that the files you think are
> supposed to be there actually are there.
> 
> 
> Jake
> 
>> 
>> Thanks for your help.
>> 
>> Regards,
>> Saurabh Agrawal
>> 
>> -Original Message-
>>From: Jacob Kjome [mailto:h...@visi.com] 
>> Sent: Tuesday, July 20, 2010 12:38 AM
>> To: Log4J Users List; saurabh.agra...@criticalpath.net
>> Subject: Re: Cannot configure apache-log4j-extras-1.0 with apache-log4j-1
>> for time based log rotation
>> 
>> What server do you use?  This should be part of your server
documentation,
>> but if it's Weblogic I might be able to tell you.  But that also depends
> on
>> the server version.
>> 
>> 
>> Jake
>> 
>> On Tue, 20 Jul 2010 00:00:37 +0530
>>  "Saurabh Agrawal"  wrote:
>>> Dear Jake,
>>> 
>>> Thanks for replying this query.
>>> Could you please tell me how to configure the application to use 
>>> child-first classloading?
>>> 
>>> Regards,
>>> Saurabh Agrawal
>>> 
>>> -Original Message-
>>>From: Jacob Kjome [mailto:h...@visi.com]
>>> Sent: Monday, July 19, 2010 10:54 PM
>>> To: Log4J Users List; saurabh.agra...@criticalpath.net
>>> Subject: Re: Cannot configure apache-log4j-extras-1.0 with 
>>>apache-log4j-1  for time based log rotation
>>> 
>>> My guess is that you have classloading issues.  Wha

Re: problem using Chainsaw, "found non matching line"

2010-07-26 Thread Florian Boulay
Ok I answered to quickly. The updated version still parses my log file, but
it always display : "found non matching line:..."

2010/7/26 Florian Boulay 

> Hi,
>
> I tried the format [TIMESTAMP] [LEVEL] * LOGGER | MESSAGE with the official
> version of Chainsaw and the updated version found here :
> http://people.apache.org/~sdeboy/ and It 
> did not work.
>
> On the updated version, nothing happen when choosing my chainsaw confg
> file. No error message in the tab "chainsaw-log". Sound like it did not
> parse any file. I also tried to delete all files in my .chainsaw directory,
> but it does not change the behavior of Chainsaw. Maybe I should try with a
> SocketAppender instead of loading a local file.
>
> 2010/7/26 Scott Deboy 
>
> Can you try
>> [TIMESTAMP] [LEVEL] * LOGGER | MESSAGE
>>
>> Also, try the updated version of Chainsaw when you have a chance and see
>> if that resolves your issue.
>>
>> Scott
>>
>>
>>
>>
>> On Jul 26, 2010, at 12:25 AM, Florian Boulay 
>> wrote:
>>
>>  Hello,
>>>
>>> These two formats do not work :
>>> - [TIMESTAMP] [LEVEL] user:[PROP(USER)] LOGGER | MESSAGE
>>> - [TIMESTAMP] [LEVEL] user:[*] LOGGER | MESSAGE
>>>
>>> I am still searching the right format, I tried just '*' and it still does
>>> not work
>>>
>>> 2010/7/23 Scott Deboy 
>>>
>>>  Try:
 [TIMESTAMP] [LEVEL] user:[PROP(USER)] LOGGER | MESSAGE

 Or, if you don't want the user property defined (you probably still want
 the
 logger, yes?)
 [TIMESTAMP] [LEVEL] user:[*] LOGGER | MESSAGE


 On Fri, Jul 23, 2010 at 9:15 AM, Florian Boulay <
 florian.bou...@gmail.com

> wrote:
>

  Hello,
>
> Since 2 days, I am trying to configure Chainsaw v2 for parsing my log4j
>
 log

> files, but it always returns "found non matching line...".
>
> Here is my log4j configuration :
> 
> 
>  
>  
>  
> 
>
> And my Chainsaw configuration :
>  class="org.apache.log4j.varia.LogFilePatternReceiver">
>  
>  
>  
>  
>  
> 
>
> It does not work. I tried a lot of logFormat, but I do not manage to
> get
>
 it

> work. Can someone help me ?
>
> Thanks
>
>

>> -
>> To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
>> For additional commands, e-mail: log4j-user-h...@logging.apache.org
>>
>>
>


Re: problem using Chainsaw, "found non matching line"

2010-07-26 Thread Florian Boulay
Hi,

I tried the format [TIMESTAMP] [LEVEL] * LOGGER | MESSAGE with the official
version of Chainsaw and the updated version found here :
http://people.apache.org/~sdeboy/ and It did not work.

On the updated version, nothing happen when choosing my chainsaw confg file.
No error message in the tab "chainsaw-log". Sound like it did not parse any
file. I also tried to delete all files in my .chainsaw directory, but it
does not change the behavior of Chainsaw. Maybe I should try with a
SocketAppender instead of loading a local file.

2010/7/26 Scott Deboy 

> Can you try
> [TIMESTAMP] [LEVEL] * LOGGER | MESSAGE
>
> Also, try the updated version of Chainsaw when you have a chance and see if
> that resolves your issue.
>
> Scott
>
>
>
>
> On Jul 26, 2010, at 12:25 AM, Florian Boulay 
> wrote:
>
>  Hello,
>>
>> These two formats do not work :
>> - [TIMESTAMP] [LEVEL] user:[PROP(USER)] LOGGER | MESSAGE
>> - [TIMESTAMP] [LEVEL] user:[*] LOGGER | MESSAGE
>>
>> I am still searching the right format, I tried just '*' and it still does
>> not work
>>
>> 2010/7/23 Scott Deboy 
>>
>>  Try:
>>> [TIMESTAMP] [LEVEL] user:[PROP(USER)] LOGGER | MESSAGE
>>>
>>> Or, if you don't want the user property defined (you probably still want
>>> the
>>> logger, yes?)
>>> [TIMESTAMP] [LEVEL] user:[*] LOGGER | MESSAGE
>>>
>>>
>>> On Fri, Jul 23, 2010 at 9:15 AM, Florian Boulay <
>>> florian.bou...@gmail.com
>>>
 wrote:

>>>
>>>  Hello,

 Since 2 days, I am trying to configure Chainsaw v2 for parsing my log4j

>>> log
>>>
 files, but it always returns "found non matching line...".

 Here is my log4j configuration :
 
 
  
  
  
 

 And my Chainsaw configuration :
 >>> class="org.apache.log4j.varia.LogFilePatternReceiver">
  
  
  
  
  
 

 It does not work. I tried a lot of logFormat, but I do not manage to get

>>> it
>>>
 work. Can someone help me ?

 Thanks


>>>
> -
> To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
> For additional commands, e-mail: log4j-user-h...@logging.apache.org
>
>


Re: problem using Chainsaw, "found non matching line"

2010-07-26 Thread Scott Deboy

Can you try
[TIMESTAMP] [LEVEL] * LOGGER | MESSAGE

Also, try the updated version of Chainsaw when you have a chance and  
see if that resolves your issue.


Scott



On Jul 26, 2010, at 12:25 AM, Florian Boulay  
 wrote:



Hello,

These two formats do not work :
- [TIMESTAMP] [LEVEL] user:[PROP(USER)] LOGGER | MESSAGE
- [TIMESTAMP] [LEVEL] user:[*] LOGGER | MESSAGE

I am still searching the right format, I tried just '*' and it still  
does

not work

2010/7/23 Scott Deboy 


Try:
[TIMESTAMP] [LEVEL] user:[PROP(USER)] LOGGER | MESSAGE

Or, if you don't want the user property defined (you probably still  
want

the
logger, yes?)
[TIMESTAMP] [LEVEL] user:[*] LOGGER | MESSAGE


On Fri, Jul 23, 2010 at 9:15 AM, Florian Boulay 
wrote:



Hello,

Since 2 days, I am trying to configure Chainsaw v2 for parsing my  
log4j

log

files, but it always returns "found non matching line...".

Here is my log4j configuration :
class="org.apache.log4j.DailyRollingFileAppender">

 
  
  
  


And my Chainsaw configuration :

  
  
  
MESSAGE"/>
  
  


It does not work. I tried a lot of logFormat, but I do not manage  
to get

it

work. Can someone help me ?

Thanks





-
To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-user-h...@logging.apache.org



Re: problem using Chainsaw, "found non matching line"

2010-07-26 Thread Florian Boulay
Hello,

These two formats do not work :
- [TIMESTAMP] [LEVEL] user:[PROP(USER)] LOGGER | MESSAGE
- [TIMESTAMP] [LEVEL] user:[*] LOGGER | MESSAGE

I am still searching the right format, I tried just '*' and it still does
not work

2010/7/23 Scott Deboy 

> Try:
> [TIMESTAMP] [LEVEL] user:[PROP(USER)] LOGGER | MESSAGE
>
> Or, if you don't want the user property defined (you probably still want
> the
> logger, yes?)
> [TIMESTAMP] [LEVEL] user:[*] LOGGER | MESSAGE
>
>
> On Fri, Jul 23, 2010 at 9:15 AM, Florian Boulay  >wrote:
>
> > Hello,
> >
> > Since 2 days, I am trying to configure Chainsaw v2 for parsing my log4j
> log
> > files, but it always returns "found non matching line...".
> >
> > Here is my log4j configuration :
> > 
> >   
> >
> >
> >
> > 
> >
> > And my Chainsaw configuration :
> >  > class="org.apache.log4j.varia.LogFilePatternReceiver">
> >
> >
> >
> >
> >
> > 
> >
> > It does not work. I tried a lot of logFormat, but I do not manage to get
> it
> > work. Can someone help me ?
> >
> > Thanks
> >
>