RE: How to configure log4j to generate XMLLayout compatible output.

2003-11-27 Thread Robert Augustyn
Paul,
Thanks this worked great.
Robert


-Original Message-
From: Paul Smith [mailto:[EMAIL PROTECTED] 
Sent: Thursday, November 27, 2003 8:41 PM
To: Log4J Users List
Subject: RE: How to configure log4j to generate
XMLLayout compatible
output.


> No I have no appender configured using XMLLayout.

> Where can I find an example? I have looked through
the

> distribution and

> could find nothing.

> Chainsaw does not throw an error it says 0 loaded

> events when opening

> the file.

> Thanks a lot.

> robert



It's pretty easy, here's a snippet from a
log4j.properties file:



log4j.rootLogger=DEBUG, A1

log4j.appender.A1=org.apache.log4j.FileAppender

log4j.appender.A1.layout=org.apache.log4j.xml.XMLLayout

log4j.appender.A1.append=true

log4j.appender.A1.file=/somepathonyoursystem/log.xml



You may want to browse the Wiki:

http://nagoya.apache.org/wiki/apachewiki.cgi?Log4JProjectPages/Frequentl
yAskedQuestions



In case configuring Log4j via property files is new,
you may find this

URL useful:



http://jakarta.apache.org/log4j/docs/api/org/apache/log4j/PropertyConfig
urator.html#doConfigure(java.lang.String,
org.apache.log4j.spi.LoggerRepository)



cheers,



Paul Smith



On Fri, 2003-11-28 at 12:25, Robert Augustyn wrote:







-

To unsubscribe, e-mail:
[EMAIL PROTECTED]

For additional commands, e-mail:
[EMAIL PROTECTED]



__
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



How stable is Chainsaw 2?

2003-11-27 Thread Robert Augustyn
Hi,
I wonder if Chainsaw 2 is a usable product?
If so where can I get it?
Thanks.
robert


__
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Log4j configuration.

2003-11-27 Thread Paul Smith
On Fri, 2003-11-28 at 13:37, Tun Lin wrote:
> Thanks for your help! It works! If I want to see the log file. Where can I see
> it? 

There will be no log 'file' as such as this configuration sends the
output to Standard Error (the System.err stream).  If you were to
redirect this to a file then you could keep it there permanently, but I
think what you really want is a FileAppender (as opposed to the
ConsoleAppender that you have configured at the moment).

See the javadocs on the file appender for more information.

cheers,

Paul

> -Original Message-
> From: Paul Smith [mailto:[EMAIL PROTECTED] 
> Sent: Friday, November 28, 2003 10:02 AM
> To: [EMAIL PROTECTED]
> Subject: RE: Log4j configuration.
> 
> On Fri, 2003-11-28 at 12:52, Tun Lin wrote:
> > Hey Paul,
> > 
> > Really appreciate your help.
> > 
> > Here is the properties file I used:
> > 
> > log4j.rootCategory=stdout
> > 
> > log4j.appender.stdout=org.apache.log4j.ConsoleAppender
> > log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
> > log4j.appender.stdout.layout.ConversionPattern=%d %c - %m%n
> 
> 
> Here's one that I use, why not replace yours with this one initially, and see if
> it works better.  
> 
> log4j.rootCategory=INFO, A1
> log4j.appender.A1=org.apache.log4j.ConsoleAppender
> log4j.appender.A1.target=System.err
> log4j.appender.A1.layout=org.apache.log4j.PatternLayout
> log4j.appender.A1.layout.conversionPattern=[%d{ISO8601} %-5p][%20.20c] %m%n
> 
> >From comparing the two, you are missing the 'target' property, and have
> a capital letter for the conversionPattern (Java is very strict on case
> sensitivity when it comes to Property getter/setters)
> 
> 
> Hope this helps,
> 
> Paul Smith


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Log4j configuration.

2003-11-27 Thread Kwok Peng Tuck
You can obtain copies of the binaries from the jakarta website.

Tun Lin wrote:

Does anyone has the latest version of log4j?  

-Original Message-
From: Jacob Kjome [mailto:[EMAIL PROTECTED] 
Sent: Friday, November 28, 2003 1:57 AM
To: Log4J Users List
Subject: Re: Log4j configuration.

You keep insisting on using non-url syntax for your setup even when you
reference the correct URL syntax.  Do this...
java -Dlog4j.configuration=file:/c:/jarfiles/log4j.properties
org.pdfbox.searchengine.lucene.LucenePDFDocument C:\\pdf\h6603lab4.pdf
Also, why are you saying...
c:\\jarfiles\log4j.properties
You are escaping the first "\", but not the second one in the path.  Shouldn't
it be?...
c:\\jarfiles\\log4j.properties
Anyway, you have to use the URL syntax above for things to work.  BTW, I've also
seen the URL file syntax on Windows be...
file:///c:/jarfiles/log4j.properties
Use whichever one works for you.

Jake

At 05:01 PM 11/27/2003 +0800, you wrote:
 

Hi,

I put my log4j.properties file in c:\\jarfiles and I did the following:

java -Dlog4j.configuration=c:\\jarfiles\log4j.properties
org.pdfbox.searchengine.lucene.LucenePDFDocument C:\\pdf\h6603lab4.pdf
But I get the following:

log4j:WARN No appenders could be found for logger 
(org.pdfbox.pdfparser.PDFParser).
log4j:WARN Please initialize the log4j system properly.

I read the manual at

http://jakarta.apache.org/log4j/docs/manual.html

It says the following needs to be done for Tomcat 4:

For example:
set 
CATALINA_OPTS=-Dlog4j.configuration=file:/c:/jarfiles/log4j.properties
In the environment variables.
And I did just that.
Can I do the following?

java -Dlog4j.configuration=c:\\jarfiles\log4j.properties
org.pdfbox.searchengine.lucene.LucenePDFDocument C:\\pdf\h6603lab4.pdf 
I can choose the ignore the error message but I would like to solve 
this problem before moving on.
Anyone can help?
   



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: Log4j configuration.

2003-11-27 Thread Tun Lin
Hey Paul,

Really appreciate your help.

Here is the properties file I used:

log4j.rootCategory=stdout

log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d %c - %m%n

Please advise. 

-Original Message-
From: Paul Smith [mailto:[EMAIL PROTECTED] 
Sent: Friday, November 28, 2003 9:44 AM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: RE: Log4j configuration.

On Fri, 2003-11-28 at 12:36, Tun Lin wrote:
> Hi Paul,
> 
> Thanks for your help and quick response but I still get the same error 
> message although there are some additional statements printed out 
> after running the following command as instructed by the last email.
> 

This is good, it helps to see that Log4j has found the file ok.

> Command typed:
> java -Dlog4j.configuration=file:///c:/jarfiles/log4j.properties
> -Dlog4j.debug=true org.pdfbox.searchengine.
> lucene.LucenePDFDocument C:\\pdf\h6603lab4.pdf
> 
> Error message:
> log4j: Using URL [file:/c:/jarfiles/log4j.properties] for automatic 
> log4j config uration.
> log4j: Reading configuration from URL 
> file:/c:/jarfiles/log4j.properties
> log4j: Parsing for [root] with value=[stdout].
> log4j: Level token is [stdout].
> log4j: Category root set to DEBUG
> log4j: Finished configuring.
> log4j:WARN No appenders could be found for logger 
> (org.pdfbox.pdfparser.PDFParse r).
> log4j:WARN Please initialize the log4j system properly. 

Next, please paste the entire contents of the c:/jarfiles/log4j.properties file
into another email to the list.  It looks like that is the culprit.

cheers,

Paul Smith




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Log4j configuration.

2003-11-27 Thread Paul Smith
On Fri, 2003-11-28 at 12:36, Tun Lin wrote:
> Hi Paul,
> 
> Thanks for your help and quick response but I still get the same error message
> although there are some additional statements printed out after running the
> following command as instructed by the last email.
> 

This is good, it helps to see that Log4j has found the file ok.

> Command typed:
> java -Dlog4j.configuration=file:///c:/jarfiles/log4j.properties
> -Dlog4j.debug=true org.pdfbox.searchengine.
> lucene.LucenePDFDocument C:\\pdf\h6603lab4.pdf
> 
> Error message:
> log4j: Using URL [file:/c:/jarfiles/log4j.properties] for automatic log4j config
> uration.
> log4j: Reading configuration from URL file:/c:/jarfiles/log4j.properties
> log4j: Parsing for [root] with value=[stdout].
> log4j: Level token is [stdout].
> log4j: Category root set to DEBUG
> log4j: Finished configuring.
> log4j:WARN No appenders could be found for logger (org.pdfbox.pdfparser.PDFParse
> r).
> log4j:WARN Please initialize the log4j system properly. 

Next, please paste the entire contents of the
c:/jarfiles/log4j.properties file into another email to the list.  It
looks like that is the culprit.

cheers,

Paul Smith


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: How to configure log4j to generate XMLLayout compatible output.

2003-11-27 Thread Paul Smith
> No I have no appender configured using XMLLayout.
> Where can I find an example? I have looked through the
> distribution and
> could find nothing.
> Chainsaw does not throw an error it says 0 loaded
> events when opening
> the file.
> Thanks a lot.
> robert

It's pretty easy, here's a snippet from a log4j.properties file:

log4j.rootLogger=DEBUG, A1
log4j.appender.A1=org.apache.log4j.FileAppender
log4j.appender.A1.layout=org.apache.log4j.xml.XMLLayout
log4j.appender.A1.append=true
log4j.appender.A1.file=/somepathonyoursystem/log.xml

You may want to browse the Wiki:
http://nagoya.apache.org/wiki/apachewiki.cgi?Log4JProjectPages/FrequentlyAskedQuestions

In case configuring Log4j via property files is new, you may find this
URL useful:

http://jakarta.apache.org/log4j/docs/api/org/apache/log4j/PropertyConfigurator.html#doConfigure(java.lang.String,
 org.apache.log4j.spi.LoggerRepository)

cheers,

Paul Smith

On Fri, 2003-11-28 at 12:25, Robert Augustyn wrote:



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Log4j configuration.

2003-11-27 Thread Tun Lin
Hi Paul,

Thanks for your help and quick response but I still get the same error message
although there are some additional statements printed out after running the
following command as instructed by the last email.

Command typed:
java -Dlog4j.configuration=file:///c:/jarfiles/log4j.properties
-Dlog4j.debug=true org.pdfbox.searchengine.
lucene.LucenePDFDocument C:\\pdf\h6603lab4.pdf

Error message:
log4j: Using URL [file:/c:/jarfiles/log4j.properties] for automatic log4j config
uration.
log4j: Reading configuration from URL file:/c:/jarfiles/log4j.properties
log4j: Parsing for [root] with value=[stdout].
log4j: Level token is [stdout].
log4j: Category root set to DEBUG
log4j: Finished configuring.
log4j:WARN No appenders could be found for logger (org.pdfbox.pdfparser.PDFParse
r).
log4j:WARN Please initialize the log4j system properly. 

-Original Message-
From: Paul Smith [mailto:[EMAIL PROTECTED] 
Sent: Friday, November 28, 2003 9:22 AM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: RE: Log4j configuration.

Please add another system property switch:  

-Dlog4j.debug=true 

e.g.

java -Dlog4j.configuration=file://c:/jarfiles/log4j.properties
org.pdfbox.searchengine.lucene.LucenePDFDocument C:\\pdf\h6603lab4.pdf

and cut/paste what is displayed to standard out into an email to this list so
that we can see what is happening..

cheers,

Paul Smith

> You keep insisting on using non-url syntax for your setup even when 
> you reference the correct URL syntax.  Do this...
> 
> java -Dlog4j.configuration=file:/c:/jarfiles/log4j.properties
> org.pdfbox.searchengine.lucene.LucenePDFDocument C:\\pdf\h6603lab4.pdf
> 
> Also, why are you saying...
> c:\\jarfiles\log4j.properties
> 
> You are escaping the first "\", but not the second one in the path.  
> Shouldn't it be?...
> c:\\jarfiles\\log4j.properties
> 
> Anyway, you have to use the URL syntax above for things to work.  BTW, 
> I've also seen the URL file syntax on Windows be...
> file:///c:/jarfiles/log4j.properties
> 
> Use whichever one works for you.
> 
> Jake
> 
> At 05:01 PM 11/27/2003 +0800, you wrote:
> >Hi,
> >
> >I put my log4j.properties file in c:\\jarfiles and I did the following:
> >
> >java -Dlog4j.configuration=c:\\jarfiles\log4j.properties
> >org.pdfbox.searchengine.lucene.LucenePDFDocument 
> >C:\\pdf\h6603lab4.pdf
> >
> >But I get the following:
> >
> >log4j:WARN No appenders could be found for logger 
> >(org.pdfbox.pdfparser.PDFParser).
> >log4j:WARN Please initialize the log4j system properly.
> >
> >I read the manual at
> >
> >http://jakarta.apache.org/log4j/docs/manual.html
> >
> >It says the following needs to be done for Tomcat 4:
> >
> >For example:
> >set
> >CATALINA_OPTS=-Dlog4j.configuration=file:/c:/jarfiles/log4j.propertie
> >s
> >In the environment variables.
> >And I did just that.
> >Can I do the following?
> >
> >java -Dlog4j.configuration=c:\\jarfiles\log4j.properties
> >org.pdfbox.searchengine.lucene.LucenePDFDocument 
> >C:\\pdf\h6603lab4.pdf I can choose the ignore the error message but I 
> >would like to solve this problem before moving on.
> >Anyone can help?
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: How to configure log4j to generate XMLLayout compatible output.

2003-11-27 Thread Robert Augustyn
Paul,
Thanks for quick response.
No I have no appender configured using XMLLayout.
Where can I find an example? I have looked through the
distribution and
could find nothing.
Chainsaw does not throw an error it says 0 loaded
events when opening
the file.
Thanks a lot.
robert

-Original Message-
From: Paul Smith [mailto:[EMAIL PROTECTED] 
Sent: Thursday, November 27, 2003 7:51 PM
To: Log4J Users List
Subject: Re: How to configure log4j to generate
XMLLayout compatible
output.


On Fri, 2003-11-28 at 11:42, Robert Augustyn wrote:

> Hi,

> I am playing around with chainsaw and it does not
look

> like it

> recognizes my log file.

> I understand that chainsaw expects XMLLayout

> compatible output file for

> it to be able to parse it.

> How do you do that?

> Thanks a lot.

> Robert

> Btw: I am using version which comes with ver 1.2.8
of

> log4j.



Hi Robert,



Do you have an appender configured that outputs using
the XMLLayout

layout class?  That's the first step.  If so, is
Chainsaw throwing an

error?  We'll need a few more details to help you. 



cheers,



Paul Smith





-

To unsubscribe, e-mail:
[EMAIL PROTECTED]

For additional commands, e-mail:
[EMAIL PROTECTED]



__
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Log4j configuration.

2003-11-27 Thread Paul Smith
Please add another system property switch:  

-Dlog4j.debug=true 

e.g.

java -Dlog4j.configuration=file://c:/jarfiles/log4j.properties
org.pdfbox.searchengine.lucene.LucenePDFDocument C:\\pdf\h6603lab4.pdf

and cut/paste what is displayed to standard out into an email to this
list so that we can see what is happening..

cheers,

Paul Smith

> You keep insisting on using non-url syntax for your setup even when you
> reference the correct URL syntax.  Do this...
> 
> java -Dlog4j.configuration=file:/c:/jarfiles/log4j.properties
> org.pdfbox.searchengine.lucene.LucenePDFDocument C:\\pdf\h6603lab4.pdf
> 
> Also, why are you saying...
> c:\\jarfiles\log4j.properties
> 
> You are escaping the first "\", but not the second one in the path.  Shouldn't
> it be?...
> c:\\jarfiles\\log4j.properties
> 
> Anyway, you have to use the URL syntax above for things to work.  BTW, I've also
> seen the URL file syntax on Windows be...
> file:///c:/jarfiles/log4j.properties
> 
> Use whichever one works for you.
> 
> Jake
> 
> At 05:01 PM 11/27/2003 +0800, you wrote:
> >Hi,
> >
> >I put my log4j.properties file in c:\\jarfiles and I did the following:
> >
> >java -Dlog4j.configuration=c:\\jarfiles\log4j.properties
> >org.pdfbox.searchengine.lucene.LucenePDFDocument C:\\pdf\h6603lab4.pdf
> >
> >But I get the following:
> >
> >log4j:WARN No appenders could be found for logger 
> >(org.pdfbox.pdfparser.PDFParser).
> >log4j:WARN Please initialize the log4j system properly.
> >
> >I read the manual at
> >
> >http://jakarta.apache.org/log4j/docs/manual.html
> >
> >It says the following needs to be done for Tomcat 4:
> >
> >For example:
> >set 
> >CATALINA_OPTS=-Dlog4j.configuration=file:/c:/jarfiles/log4j.properties
> >In the environment variables.
> >And I did just that.
> >Can I do the following?
> >
> >java -Dlog4j.configuration=c:\\jarfiles\log4j.properties
> >org.pdfbox.searchengine.lucene.LucenePDFDocument C:\\pdf\h6603lab4.pdf 
> >I can choose the ignore the error message but I would like to solve 
> >this problem before moving on.
> >Anyone can help?
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Does anyone has the latest version of log4j?

2003-11-27 Thread Tun Lin
Hi,

May I know why I always get an email below whenever I sent a message to
[EMAIL PROTECTED]

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Friday, November 28, 2003 10:14 AM
To: [EMAIL PROTECTED]
Subject: Re: Does anyone has the latest version of log4j? 

Your BuddyScript Server is not connected to BSCS!  For instructions, see
http://bscs.buddyscript.com/log4j-user/ 


Build your own interactive agent!  Download BuddyScript SDK for FREE today at
http://buddyscript.com/.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Log4j configuration.

2003-11-27 Thread Tun Lin
Does anyone has the latest version of log4j?  

-Original Message-
From: Jacob Kjome [mailto:[EMAIL PROTECTED] 
Sent: Friday, November 28, 2003 1:57 AM
To: Log4J Users List
Subject: Re: Log4j configuration.


You keep insisting on using non-url syntax for your setup even when you
reference the correct URL syntax.  Do this...

java -Dlog4j.configuration=file:/c:/jarfiles/log4j.properties
org.pdfbox.searchengine.lucene.LucenePDFDocument C:\\pdf\h6603lab4.pdf

Also, why are you saying...
c:\\jarfiles\log4j.properties

You are escaping the first "\", but not the second one in the path.  Shouldn't
it be?...
c:\\jarfiles\\log4j.properties

Anyway, you have to use the URL syntax above for things to work.  BTW, I've also
seen the URL file syntax on Windows be...
file:///c:/jarfiles/log4j.properties

Use whichever one works for you.

Jake

At 05:01 PM 11/27/2003 +0800, you wrote:
>Hi,
>
>I put my log4j.properties file in c:\\jarfiles and I did the following:
>
>java -Dlog4j.configuration=c:\\jarfiles\log4j.properties
>org.pdfbox.searchengine.lucene.LucenePDFDocument C:\\pdf\h6603lab4.pdf
>
>But I get the following:
>
>log4j:WARN No appenders could be found for logger 
>(org.pdfbox.pdfparser.PDFParser).
>log4j:WARN Please initialize the log4j system properly.
>
>I read the manual at
>
>http://jakarta.apache.org/log4j/docs/manual.html
>
>It says the following needs to be done for Tomcat 4:
>
>For example:
>set 
>CATALINA_OPTS=-Dlog4j.configuration=file:/c:/jarfiles/log4j.properties
>In the environment variables.
>And I did just that.
>Can I do the following?
>
>java -Dlog4j.configuration=c:\\jarfiles\log4j.properties
>org.pdfbox.searchengine.lucene.LucenePDFDocument C:\\pdf\h6603lab4.pdf 
>I can choose the ignore the error message but I would like to solve 
>this problem before moving on.
>Anyone can help?


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Log4j configuration.

2003-11-27 Thread Tun Lin
I still have the error message. Is it the jar version problem? 

-Original Message-
From: Jacob Kjome [mailto:[EMAIL PROTECTED] 
Sent: Friday, November 28, 2003 1:57 AM
To: Log4J Users List
Subject: Re: Log4j configuration.


You keep insisting on using non-url syntax for your setup even when you
reference the correct URL syntax.  Do this...

java -Dlog4j.configuration=file:/c:/jarfiles/log4j.properties
org.pdfbox.searchengine.lucene.LucenePDFDocument C:\\pdf\h6603lab4.pdf

Also, why are you saying...
c:\\jarfiles\log4j.properties

You are escaping the first "\", but not the second one in the path.  Shouldn't
it be?...
c:\\jarfiles\\log4j.properties

Anyway, you have to use the URL syntax above for things to work.  BTW, I've also
seen the URL file syntax on Windows be...
file:///c:/jarfiles/log4j.properties

Use whichever one works for you.

Jake

At 05:01 PM 11/27/2003 +0800, you wrote:
>Hi,
>
>I put my log4j.properties file in c:\\jarfiles and I did the following:
>
>java -Dlog4j.configuration=c:\\jarfiles\log4j.properties
>org.pdfbox.searchengine.lucene.LucenePDFDocument C:\\pdf\h6603lab4.pdf
>
>But I get the following:
>
>log4j:WARN No appenders could be found for logger 
>(org.pdfbox.pdfparser.PDFParser).
>log4j:WARN Please initialize the log4j system properly.
>
>I read the manual at
>
>http://jakarta.apache.org/log4j/docs/manual.html
>
>It says the following needs to be done for Tomcat 4:
>
>For example:
>set 
>CATALINA_OPTS=-Dlog4j.configuration=file:/c:/jarfiles/log4j.properties
>In the environment variables.
>And I did just that.
>Can I do the following?
>
>java -Dlog4j.configuration=c:\\jarfiles\log4j.properties
>org.pdfbox.searchengine.lucene.LucenePDFDocument C:\\pdf\h6603lab4.pdf 
>I can choose the ignore the error message but I would like to solve 
>this problem before moving on.
>Anyone can help?


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to configure log4j to generate XMLLayout compatible output.

2003-11-27 Thread Paul Smith
On Fri, 2003-11-28 at 11:42, Robert Augustyn wrote:
> Hi,
> I am playing around with chainsaw and it does not look
> like it
> recognizes my log file.
> I understand that chainsaw expects XMLLayout
> compatible output file for
> it to be able to parse it.
> How do you do that?
> Thanks a lot.
> Robert
> Btw: I am using version which comes with ver 1.2.8 of
> log4j.

Hi Robert,

Do you have an appender configured that outputs using the XMLLayout
layout class?  That's the first step.  If so, is Chainsaw throwing an
error?  We'll need a few more details to help you. 

cheers,

Paul Smith


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



How to configure log4j to generate XMLLayout compatible output.

2003-11-27 Thread Robert Augustyn

Hi,
I am playing around with chainsaw and it does not look
like it
recognizes my log file.
I understand that chainsaw expects XMLLayout
compatible output file for
it to be able to parse it.
How do you do that?
Thanks a lot.
Robert
Btw: I am using version which comes with ver 1.2.8 of
log4j.


__
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: I am not getting stack trace from logger.error("error",e)?

2003-11-27 Thread Robert Augustyn
Paul,
Thanks, I am running 1.4.2 vm and it does not look
like it's fixed...
It is real pain!.
robert

-Original Message-
From: Paul Smith [mailto:[EMAIL PROTECTED] 
Sent: Thursday, November 27, 2003 7:02 PM
To: Log4J Users List
Subject: RE: I am not getting stack trace from
logger.error("error",e)?


On Fri, 2003-11-28 at 10:45, Robert Augustyn wrote:

> Hi Ceki,

> I am getting just one line like:

> Java.NullPointerException:



This maybe only a very slight possibility, but I have
seen exactly what

you are describing in our production environment when
we are using the

-server option under the Sun 1.4.2 JDK under Linux (no
JBoss though). 

Just a single line with no more information.



See this bug:

http://developer.java.sun.com/developer/bugParade/bugs/4761344.html



They say it is fixed in 1.4.2, and while it does not
happen with the

frequency it used to, it's one to look out for.  Not
using the -server

option seems to help, although you lose some
performance there.



cheers,



Paul Smith





-

To unsubscribe, e-mail:
[EMAIL PROTECTED]

For additional commands, e-mail:
[EMAIL PROTECTED]




__
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: I am not getting stack trace from logger.error("error",e)?

2003-11-27 Thread Paul Smith
On Fri, 2003-11-28 at 10:45, Robert Augustyn wrote:
> Hi Ceki,
> I am getting just one line like:
> Java.NullPointerException:

This maybe only a very slight possibility, but I have seen exactly what
you are describing in our production environment when we are using the
-server option under the Sun 1.4.2 JDK under Linux (no JBoss though). 
Just a single line with no more information.

See this bug:
http://developer.java.sun.com/developer/bugParade/bugs/4761344.html

They say it is fixed in 1.4.2, and while it does not happen with the
frequency it used to, it's one to look out for.  Not using the -server
option seems to help, although you lose some performance there.

cheers,

Paul Smith


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: I am not getting stack trace from logger.error("error",e)?

2003-11-27 Thread Robert Augustyn
Title: Message



Hi Ceki,I am getting just one line 
like:Java.NullPointerException:Yes, I have configured it.I have 
to add that this is used with 
jboss.Thanksrobert-Original Message-From: 
Ceki Gülcü [mailto:[EMAIL PROTECTED]]Sent: 
Thursday, November 27, 2003 4:49 PMTo: Log4J Users ListSubject: Re: I am 
not getting stack trace from 
logger.error("error",e)?Your invocation of the 
'error' method is correct. What are you observing?Have you configured 
log4j?At 01:40 PM 11/27/2003 -0800, Robert Augustyn 
wrote:>Hi,>I was expecting that I would get stack trace 
from following call:>}catch(Exception e){>   
logger.error("Error",e);>}>>What could possibly 
be a problem?>Thanks in 
advance.>robert--Ceki 
Gülcü  For log4j documentation 
consider "The complete log4j manual"  ISBN: 
2970036908 http://www.qos.ch/shop/products/clm_t.jsp -To 
unsubscribe, e-mail: [EMAIL PROTECTED]For 
additional commands, e-mail: 
[EMAIL PROTECTED]

Do you Yahoo!?
Free Pop-Up Blocker - Get it now












http://jakarta.apache.org/log4j/"; debug="false">

   
   
   

   
   
  
  
  

  
  

  
 
 


  
   



   
   
   

   
  
  
  

  
 
 
  
   

   
  
  
  
  
 
  
   



   
   
   

   
   
  
   

   
   
 
   


   
   
   

   
  
  
   





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Re: I am not getting stack trace from logger.error("error",e)?

2003-11-27 Thread Ceki Gülcü


Your invocation of the 'error' method is correct. What are you observing? 
Have you configured log4j?

At 01:40 PM 11/27/2003 -0800, Robert Augustyn wrote:
Hi,
I was expecting that I would get stack trace from following call:
}catch(Exception e){
  logger.error("Error",e);
}
What could possibly be a problem?
Thanks in advance.
robert
--
Ceki Gülcü
 For log4j documentation consider "The complete log4j manual"
 ISBN: 2970036908 http://www.qos.ch/shop/products/clm_t.jsp  



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


I am not getting stack trace from logger.error("error",e)?

2003-11-27 Thread Robert Augustyn
Hi,
I was expecting that I would get stack trace from following call:
}catch(Exception e){
  logger.error("Error",e);
}
 
What could possibly be a problem?
Thanks in advance.
robert
 


-
Do you Yahoo!?
Free Pop-Up Blocker - Get it now

Re: Log4j configuration.

2003-11-27 Thread Jacob Kjome
You keep insisting on using non-url syntax for your setup even when you 
reference the correct URL syntax.  Do this...

java -Dlog4j.configuration=file:/c:/jarfiles/log4j.properties
org.pdfbox.searchengine.lucene.LucenePDFDocument C:\\pdf\h6603lab4.pdf
Also, why are you saying...
c:\\jarfiles\log4j.properties
You are escaping the first "\", but not the second one in the 
path.  Shouldn't it be?...
c:\\jarfiles\\log4j.properties

Anyway, you have to use the URL syntax above for things to work.  BTW, I've 
also seen the URL file syntax on Windows be...
file:///c:/jarfiles/log4j.properties

Use whichever one works for you.

Jake

At 05:01 PM 11/27/2003 +0800, you wrote:
Hi,

I put my log4j.properties file in c:\\jarfiles and I did the following:

java -Dlog4j.configuration=c:\\jarfiles\log4j.properties
org.pdfbox.searchengine.lucene.LucenePDFDocument C:\\pdf\h6603lab4.pdf
But I get the following:

log4j:WARN No appenders could be found for logger
(org.pdfbox.pdfparser.PDFParser).
log4j:WARN Please initialize the log4j system properly.
I read the manual at

http://jakarta.apache.org/log4j/docs/manual.html

It says the following needs to be done for Tomcat 4:

For example:
set CATALINA_OPTS=-Dlog4j.configuration=file:/c:/jarfiles/log4j.properties
In the environment variables.
And I did just that.
Can I do the following?
java -Dlog4j.configuration=c:\\jarfiles\log4j.properties
org.pdfbox.searchengine.lucene.LucenePDFDocument C:\\pdf\h6603lab4.pdf
I can choose the ignore the error message but I would like to solve this 
problem
before moving on.
Anyone can help?


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: Newbie setup on Orion

2003-11-27 Thread Tun Lin
Is the latest jar file 345KB? However, I still have 

log4j:WARN No appenders could be found for
logger(org.pdfbox.pdfparser.PDFParser).
log4j:WARN Please initialize the log4j system properly.

What is wrong? Can anyone help? 

-Original Message-
From: Brian McSweeney [mailto:[EMAIL PROTECTED] 
Sent: Thursday, November 27, 2003 6:57 PM
To: 'Log4J Users List'
Subject: RE: Newbie setup on Orion

Hi Thomas,

Thanks for the reply. I finally got it working today. It was a log4j version
issue I think. Using the latest jar fixed the problem. Thanks for your help!
Brian

-Original Message-
From: Thomas Svensen [mailto:[EMAIL PROTECTED]
Sent: 27 November 2003 09:06
To: Log4J Users List
Subject: RE: Newbie setup on Orion

Sorry, I have been a little busy.
Have you got any further on this?
I am 100% sure that we don't do any log4j configuration in the code!
Have you tested the log4j configuration outside Orion?
Have you tried starting Orion with -Dlog4j.debug=true?

- Thomas

> -Original Message-
> From: Brian McSweeney [mailto:[EMAIL PROTECTED]
> Sent: 25. november 2003 13:35
> To: 'Log4J Users List'
> Subject: RE: Newbie setup on Orion
> 
> 
> Thanks a Million Thomas!
> 
> Really appreciate it. Guess what, only problem - didn't get it to work
> :-)
> Just to make sure again. I put the log4j.jar in orion/lib and the 
> log4j.xml in my WEB-INF/classes of the war. The war is inside an ear.
> 
> I can see the log4j.xml in the war when orion explodes it out in the 
> applications directory but I'm still getting the following error in
> orion:
> 
> 
> log4j:WARN No appenders could be found for logger 
> (com.myapp.web.onload.Init).
> log4j:WARN Please initialize the log4j system properly.
> java.lang.NullPointerException
> at com.myapp.web.onload.Init.setTimeZoneAndLocale(Unknown
> Source)
> at com.myapp.web.onload.Init.contextInitialized(Unknown
Source)
> at com.evermind._ay._lee(.:552)
> at com.evermind._ay.(.:317)
> at com.evermind._am._rtb(.:607)
> at com.evermind._ex._rtb(.:581)
> at com.evermind._eu._kae(.:482)
> at com.evermind._eu._bi(.:226)
> at com.evermind._ex._bn(.:240)
> at com.evermind._ex._bi(.:146)
> at com.evermind.server.ApplicationServer._gke(.:1730)
> at com.evermind.server.ApplicationServer._bi(.:1068)
> at com.evermind._ctb.run(.:89)
> at java.lang.Thread.run(Thread.java:536)
> at com.evermind._bf.run(.:47)
> 
> Any ideas? Are you sure that you don't initialize log4j in code 
> anywhere? I'm running orion version 2.0.2 Thanks for the help!
> Brian
> 
> 
> -Original Message-
> From: Thomas Svensen [mailto:[EMAIL PROTECTED]
> Sent: 25 November 2003 12:05
> To: Log4J Users List
> Subject: RE: Newbie setup on Orion
> 
> Here is an extract of our log4j.xml file. Socket appender is nice,
e.g.
> lets
> you have the server send logs to a local Chainsaw running on your own 
> computer :-)
> 
> Regarding file path, it is relative from the orion base directory. So 
> the setup below logs to .../orion/log/content.log
> 
> Happy logging! :-)
> 
> - Thomas S.
> 
> 
>   debug="false"
> xmlns:log4j="http://jakarta.apache.org/log4j/";>
>class="org.apache.log4j.DailyRollingFileAppender">
>   
>   
>   
>value="%d{HH:mm:ss,SSS} [%-5.5p]
> %-20c{1}: %m %x\n"/>
>   
>   
>class="org.apache.log4j.net.SocketAppender">
>   
>   
>   
>   
>   
>   
>   
>   
> 
> 
> 
> 
> 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Newbie setup on Orion

2003-11-27 Thread Brian McSweeney
Hi Thomas,

Thanks for the reply. I finally got it working today. It was a log4j
version issue I think. Using the latest jar fixed the problem. Thanks
for your help!
Brian

-Original Message-
From: Thomas Svensen [mailto:[EMAIL PROTECTED] 
Sent: 27 November 2003 09:06
To: Log4J Users List
Subject: RE: Newbie setup on Orion

Sorry, I have been a little busy.
Have you got any further on this?
I am 100% sure that we don't do any log4j configuration in the code!
Have you tested the log4j configuration outside Orion?
Have you tried starting Orion with -Dlog4j.debug=true?

- Thomas

> -Original Message-
> From: Brian McSweeney [mailto:[EMAIL PROTECTED]
> Sent: 25. november 2003 13:35
> To: 'Log4J Users List'
> Subject: RE: Newbie setup on Orion
> 
> 
> Thanks a Million Thomas!
> 
> Really appreciate it. Guess what, only problem - didn't get it to work
> :-)
> Just to make sure again. I put the log4j.jar in orion/lib and the
> log4j.xml in my WEB-INF/classes of the war. The war is inside an ear.
> 
> I can see the log4j.xml in the war when orion explodes it out in the
> applications directory but I'm still getting the following error in
> orion:
> 
> 
> log4j:WARN No appenders could be found for logger
> (com.myapp.web.onload.Init).
> log4j:WARN Please initialize the log4j system properly.
> java.lang.NullPointerException
> at com.myapp.web.onload.Init.setTimeZoneAndLocale(Unknown
> Source)
> at com.myapp.web.onload.Init.contextInitialized(Unknown
Source)
> at com.evermind._ay._lee(.:552)
> at com.evermind._ay.(.:317)
> at com.evermind._am._rtb(.:607)
> at com.evermind._ex._rtb(.:581)
> at com.evermind._eu._kae(.:482)
> at com.evermind._eu._bi(.:226)
> at com.evermind._ex._bn(.:240)
> at com.evermind._ex._bi(.:146)
> at com.evermind.server.ApplicationServer._gke(.:1730)
> at com.evermind.server.ApplicationServer._bi(.:1068)
> at com.evermind._ctb.run(.:89)
> at java.lang.Thread.run(Thread.java:536)
> at com.evermind._bf.run(.:47)
> 
> Any ideas? Are you sure that you don't initialize log4j in code
> anywhere? I'm running orion version 2.0.2
> Thanks for the help!
> Brian
> 
> 
> -Original Message-
> From: Thomas Svensen [mailto:[EMAIL PROTECTED] 
> Sent: 25 November 2003 12:05
> To: Log4J Users List
> Subject: RE: Newbie setup on Orion
> 
> Here is an extract of our log4j.xml file. Socket appender is nice,
e.g.
> lets
> you have the server send logs to a local Chainsaw running on your own
> computer :-)
> 
> Regarding file path, it is relative from the orion base directory. So
> the
> setup below logs to .../orion/log/content.log
> 
> Happy logging! :-)
> 
> - Thomas S.
> 
> 
> 
>  xmlns:log4j="http://jakarta.apache.org/log4j/";>
>class="org.apache.log4j.DailyRollingFileAppender">
>   
>   
>   
>value="%d{HH:mm:ss,SSS} [%-5.5p]
> %-20c{1}: %m %x\n"/>
>   
>   
>class="org.apache.log4j.net.SocketAppender">
>   
>   
>   
>   
>   
>   
>   
>   
> 
> 
> 
> 
> 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Newbie setup on Orion

2003-11-27 Thread Thomas Svensen
Sorry, I have been a little busy.
Have you got any further on this?
I am 100% sure that we don't do any log4j configuration in the code!
Have you tested the log4j configuration outside Orion?
Have you tried starting Orion with -Dlog4j.debug=true?

- Thomas

> -Original Message-
> From: Brian McSweeney [mailto:[EMAIL PROTECTED]
> Sent: 25. november 2003 13:35
> To: 'Log4J Users List'
> Subject: RE: Newbie setup on Orion
> 
> 
> Thanks a Million Thomas!
> 
> Really appreciate it. Guess what, only problem - didn't get it to work
> :-)
> Just to make sure again. I put the log4j.jar in orion/lib and the
> log4j.xml in my WEB-INF/classes of the war. The war is inside an ear.
> 
> I can see the log4j.xml in the war when orion explodes it out in the
> applications directory but I'm still getting the following error in
> orion:
> 
> 
> log4j:WARN No appenders could be found for logger
> (com.myapp.web.onload.Init).
> log4j:WARN Please initialize the log4j system properly.
> java.lang.NullPointerException
> at com.myapp.web.onload.Init.setTimeZoneAndLocale(Unknown
> Source)
> at com.myapp.web.onload.Init.contextInitialized(Unknown Source)
> at com.evermind._ay._lee(.:552)
> at com.evermind._ay.(.:317)
> at com.evermind._am._rtb(.:607)
> at com.evermind._ex._rtb(.:581)
> at com.evermind._eu._kae(.:482)
> at com.evermind._eu._bi(.:226)
> at com.evermind._ex._bn(.:240)
> at com.evermind._ex._bi(.:146)
> at com.evermind.server.ApplicationServer._gke(.:1730)
> at com.evermind.server.ApplicationServer._bi(.:1068)
> at com.evermind._ctb.run(.:89)
> at java.lang.Thread.run(Thread.java:536)
> at com.evermind._bf.run(.:47)
> 
> Any ideas? Are you sure that you don't initialize log4j in code
> anywhere? I'm running orion version 2.0.2
> Thanks for the help!
> Brian
> 
> 
> -Original Message-
> From: Thomas Svensen [mailto:[EMAIL PROTECTED] 
> Sent: 25 November 2003 12:05
> To: Log4J Users List
> Subject: RE: Newbie setup on Orion
> 
> Here is an extract of our log4j.xml file. Socket appender is nice, e.g.
> lets
> you have the server send logs to a local Chainsaw running on your own
> computer :-)
> 
> Regarding file path, it is relative from the orion base directory. So
> the
> setup below logs to .../orion/log/content.log
> 
> Happy logging! :-)
> 
> - Thomas S.
> 
> 
> 
>  xmlns:log4j="http://jakarta.apache.org/log4j/";>
>class="org.apache.log4j.DailyRollingFileAppender">
>   
>   
>   
>value="%d{HH:mm:ss,SSS} [%-5.5p]
> %-20c{1}: %m %x\n"/>
>   
>   
>class="org.apache.log4j.net.SocketAppender">
>   
>   
>   
>   
>   
>   
>   
>   
> 
> 
> 
> 
> 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Log4j configuration.

2003-11-27 Thread Tun Lin
Hi,

I put my log4j.properties file in c:\\jarfiles and I did the following:

java -Dlog4j.configuration=c:\\jarfiles\log4j.properties
org.pdfbox.searchengine.lucene.LucenePDFDocument C:\\pdf\h6603lab4.pdf

But I get the following:

log4j:WARN No appenders could be found for logger
(org.pdfbox.pdfparser.PDFParser).
log4j:WARN Please initialize the log4j system properly.

I read the manual at

http://jakarta.apache.org/log4j/docs/manual.html

It says the following needs to be done for Tomcat 4:

For example:
set CATALINA_OPTS=-Dlog4j.configuration=file:/c:/jarfiles/log4j.properties 
In the environment variables.
And I did just that.
Can I do the following?
 
java -Dlog4j.configuration=c:\\jarfiles\log4j.properties
org.pdfbox.searchengine.lucene.LucenePDFDocument C:\\pdf\h6603lab4.pdf
I can choose the ignore the error message but I would like to solve this problem
before moving on.
Anyone can help?