Adding an abstraction level

2003-10-03 Thread Jitesh_Arya












Hi, this is my first mail to this mailing list and its not been
long since I subscribed to it. So, please forgive if I sound really stupid
putting forth my question(s).

What we have done is we have added another level of abstraction between
the application (some web app) developer and the log4j. We have written another

class that imports log4j and other classes that are required for
logging and written our own functions without any added functionality. That is,
my debug will in turn

call log4js debug method. Another thing that has been added is:
the isDebugEnabled () check before debug () of log4j is called. And similarly, isEnabledfor(level)

for other levels. Now, my
questions:

1)
Is this added level of abstraction
advisable?

2)
Does the check before the call to
log4j method serve any purpose (here in my case) in reducing the cost? This (in
normal cases, not here) does prevent the cost of parameter construction when implemented
in application directly (this I understand). But here, the parameters will be
constructed, (so no savings on that side) when call is made to the debug () or
any other method that we have implemented. So, you see anything here (diamond
or just coal)?



A heavy lot of thanks in ADVANCEJ



Regards,

Jitesh






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

RE: Adding an abstraction level

2003-10-03 Thread Jain, Siddharth (ODC - Satyam)
Hi Jitesh,
 
I really do not think this would help you, since there is a property known
as threshold in log4j, which specifies the minimum logging level, thereby,
if you want that in certain deployment scenarios, or for certain appenders,
messages should be logged above a certain level, then just specify this
property to whatever level u want, because internally, log4j checks for the
the level being enabled or not.
I hope this helps you out.
 
Cheers
Siddharth
 
 
 -Original Message-
From: Jitesh_Arya [mailto:[EMAIL PROTECTED]
Sent: Friday, October 03, 2003 11:49 AM
To: Log4J Users List
Subject: Adding an abstraction level


 
 
Hi, this is my first mail to this mailing list and it's not been long since
I subscribed to it. So, please forgive if I sound really stupid putting
forth my question(s).
What we have done is we have added another level of abstraction between the
application (some web app) developer and the log4j. We have written another
class that imports log4j and other classes that are required for logging and
written our own functions without any added functionality. That is, my debug
will in turn
call log4j's debug method. Another thing that has been added is: the
isDebugEnabled () check before debug () of log4j is called. And similarly,
isEnabledfor(level)
for other levels. Now, my questions:
1)  Is this added level of abstraction advisable?
2)  Does the check before the call to log4j method serve any purpose
(here in my case) in reducing the cost? This (in normal cases, not here)
does prevent the cost of parameter construction when implemented in
application directly (this I understand). But here, the parameters will be
constructed, (so no savings on that side) when call is made to the debug ()
or any other method that we have implemented. So, you see anything here
(diamond or just coal)?
 
A heavy lot of thanks in ADVANCE:-)
 
Regards,
Jitesh


Infinite backups in rollingfiel appender.

2003-10-03 Thread Jitesh_Arya
Is it possible to have an infinite number of backups of logs created
(say through rollingfile appender)? I mean, I just don't want to have
any kind of limits. If there is any way then please let me know.
Thanks in advance.

Regards,

Jitesh,
SETLabs


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



log4j using appender but not specified pattern

2003-10-03 Thread tom ONeill
Hi all,

I was wondering if anyone could give me some ideas on what might be causing 
a small problem that I have. In my log4j properties file (XML format) I have 
set up a particular appender that writes to a file. I have also specified a 
particular Pattern for the appender. Now the logging entries are being 
written to the appender but are not using the pattern that I specified.

The appender is specified in the logging file as follows

appender name=PerfAppender class=org.apache.log4j.FileAppender
   param name=File   value=Perf.log /
   param name=Append value=true /
   layout class=org.apache.log4j.PatternLayout
  param name=ConversionPattern value=%d - %m%n/
   /layout
/appender
This appender is then associated with a a particular logger as follows:

logger name=MainLog
   level class=de.start.sip.tools.logging.OurLogLevel 
value=trace/
   appender-ref ref=PerfAppender /
/logger

When I execute my application the Perf.log file is being written however it 
does not include the datetime which I would expect from using %d in the 
specified pattern for the appender. Not all the code is my own so its 
possible that there is somthing going on that I dont know about but what I 
need to know is the possible ways in which an appender could be used without 
actually using the specified pattern?

Thanks,

Tom

_
The new MSN 8: advanced junk mail protection and 2 months FREE* 
http://join.msn.com/?page=features/junkmail

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


RE: Chaining

2003-10-03 Thread David Liles
What is NDC?

-Original Message-
From: Paul Smith [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 01, 2003 4:59 PM
To: Log4J Users List
Subject: Re: Chaining


This is where the NDC would be useful.

In Class 2:

NDC.push(Class 2);

In Class 1:

NDC.push(Class 1);

Then when you are ready to log a message:

log.debug(Message);

The NDC entries will be available via the LoggingEvent that is send to
the appender, so if you configure an appender to actually output the
contents of the NDC, you'll be able to see it. (see things like
PatternLayout on how to explicitly request NDC to be output in the
appender).  NDC acts as a Stack for each Thread of execution, so it
retains the order of push/pop.

Don't forget to NDC.pop() at the end of each method where you
NDC.push(...)..

cheers,

Paul Smith

On Thu, 2003-10-02 at 01:10, David Liles wrote:
 I just started using log4j and am having trouble trying to figure out how to chain 
 logging messages
  
 class 1 makes a call to class 2 I would like to be able to pass the message from 
 class 2 to class 1 where it would ultimately be logged, that way when I review the 
 log file it would show that the message originated in class 2, but would be 
 displayed something like this:
  
 class2 - class1 - message.
  
 Hope I'm making sense
  
 Thanks - Dave


-
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 using appender but not specified pattern

2003-10-03 Thread Ceki Gülcü
Tom,

The configuration directives look good. What does the log4j internal 
logging output say?

At 08:36 AM 10/3/2003 +, tom ONeill wrote:
Hi all,

I was wondering if anyone could give me some ideas on what might be 
causing a small problem that I have. In my log4j properties file (XML 
format) I have set up a particular appender that writes to a file. I have 
also specified a particular Pattern for the appender. Now the logging 
entries are being written to the appender but are not using the pattern 
that I specified.

The appender is specified in the logging file as follows

appender name=PerfAppender class=org.apache.log4j.FileAppender
   param name=File   value=Perf.log /
   param name=Append value=true /
   layout class=org.apache.log4j.PatternLayout
  param name=ConversionPattern value=%d - %m%n/
   /layout
/appender
This appender is then associated with a a particular logger as follows:

logger name=MainLog
   level class=de.start.sip.tools.logging.OurLogLevel 
value=trace/
   appender-ref ref=PerfAppender /
/logger

When I execute my application the Perf.log file is being written however 
it does not include the datetime which I would expect from using %d in the 
specified pattern for the appender. Not all the code is my own so its 
possible that there is somthing going on that I dont know about but what I 
need to know is the possible ways in which an appender could be used 
without actually using the specified pattern?

Thanks,

Tom
--
Ceki Gülcü
 For log4j documentation consider The complete log4j manual
 ISBN: 2970036908 http://www.qos.ch/shop/products/clm_t.jsp
 import org.apache.Facetime;
 ApacheCon US 2003, 18-21 November http://apachecon.com/


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


Re: log4j using appender but not specified pattern

2003-10-03 Thread tom ONeill
Hi Ceki,

I dont actually get the internal logging output. The root element of the 
properties is as follows:

log4j:configuration xmlns:log4j=http://jakarta.apache.org/log4j/; 
debug=true

However I dont get the debug output so Im none the wiser there

Tom


From: Ceki Gülcü [EMAIL PROTECTED]
Reply-To: Log4J Users List [EMAIL PROTECTED]
To: Log4J Users List [EMAIL PROTECTED]
Subject: Re: log4j using appender but not specified pattern
Date: Fri, 03 Oct 2003 11:14:20 +0200
Tom,

The configuration directives look good. What does the log4j internal 
logging output say?

At 08:36 AM 10/3/2003 +, tom ONeill wrote:
Hi all,

I was wondering if anyone could give me some ideas on what might be 
causing a small problem that I have. In my log4j properties file (XML 
format) I have set up a particular appender that writes to a file. I have 
also specified a particular Pattern for the appender. Now the logging 
entries are being written to the appender but are not using the pattern 
that I specified.

The appender is specified in the logging file as follows

appender name=PerfAppender class=org.apache.log4j.FileAppender
   param name=File   value=Perf.log /
   param name=Append value=true /
   layout class=org.apache.log4j.PatternLayout
  param name=ConversionPattern value=%d - %m%n/
   /layout
/appender
This appender is then associated with a a particular logger as follows:

logger name=MainLog
   level class=de.start.sip.tools.logging.OurLogLevel 
value=trace/
   appender-ref ref=PerfAppender /
/logger

When I execute my application the Perf.log file is being written however 
it does not include the datetime which I would expect from using %d in the 
specified pattern for the appender. Not all the code is my own so its 
possible that there is somthing going on that I dont know about but what I 
need to know is the possible ways in which an appender could be used 
without actually using the specified pattern?

Thanks,

Tom
--
Ceki Gülcü
 For log4j documentation consider The complete log4j manual
 ISBN: 2970036908 http://www.qos.ch/shop/products/clm_t.jsp
 import org.apache.Facetime;
 ApacheCon US 2003, 18-21 November http://apachecon.com/


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
_
Help STOP SPAM with the new MSN 8 and get 2 months FREE*  
http://join.msn.com/?page=features/junkmail

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


Re: log4j using appender but not specified pattern

2003-10-03 Thread Ceki Gülcü
Hi Tom,

This may indicate that a different config file is in use.

At 11:43 AM 10/3/2003 +, tom ONeill wrote:
Hi Ceki,

I dont actually get the internal logging output. The root element of the 
properties is as follows:

log4j:configuration xmlns:log4j=http://jakarta.apache.org/log4j/; 
debug=true

However I dont get the debug output so Im none the wiser there

Tom


From: Ceki Gülcü [EMAIL PROTECTED]
Reply-To: Log4J Users List [EMAIL PROTECTED]
To: Log4J Users List [EMAIL PROTECTED]
Subject: Re: log4j using appender but not specified pattern
Date: Fri, 03 Oct 2003 11:14:20 +0200
Tom,

The configuration directives look good. What does the log4j internal 
logging output say?

At 08:36 AM 10/3/2003 +, tom ONeill wrote:
Hi all,

I was wondering if anyone could give me some ideas on what might be 
causing a small problem that I have. In my log4j properties file (XML 
format) I have set up a particular appender that writes to a file. I 
have also specified a particular Pattern for the appender. Now the 
logging entries are being written to the appender but are not using the 
pattern that I specified.

The appender is specified in the logging file as follows

appender name=PerfAppender class=org.apache.log4j.FileAppender
   param name=File   value=Perf.log /
   param name=Append value=true /
   layout class=org.apache.log4j.PatternLayout
  param name=ConversionPattern value=%d - %m%n/
   /layout
/appender
This appender is then associated with a a particular logger as follows:

logger name=MainLog
   level class=de.start.sip.tools.logging.OurLogLevel 
value=trace/
   appender-ref ref=PerfAppender /
/logger

When I execute my application the Perf.log file is being written however 
it does not include the datetime which I would expect from using %d in 
the specified pattern for the appender. Not all the code is my own so 
its possible that there is somthing going on that I dont know about but 
what I need to know is the possible ways in which an appender could be 
used without actually using the specified pattern?

Thanks,

Tom
--
Ceki Gülcü
 For log4j documentation consider The complete log4j manual
 ISBN: 2970036908 http://www.qos.ch/shop/products/clm_t.jsp
 import org.apache.Facetime;
 ApacheCon US 2003, 18-21 November http://apachecon.com/


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
_
Help STOP SPAM with the new MSN 8 and get 2 months FREE*
http://join.msn.com/?page=features/junkmail
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
Ceki Gülcü
 For log4j documentation consider The complete log4j manual
 ISBN: 2970036908 http://www.qos.ch/shop/products/clm_t.jsp
 import org.apache.Facetime;
 ApacheCon US 2003, 18-21 November http://apachecon.com/


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


RE: Adding an abstraction level

2003-10-03 Thread Shapira, Yoav

Howdy,
Not quite.  Using isEnabledFor(Level l), e.g. isDebugEnabled() around
logger.debug statements can significantly reduce logging overhead.  You
should read the log4j manual on this issue, as it contains a more
complete explanation and benchmarks.

As for your level of abstraction, which on this list we often refer to
as a log4j wrapper: chances are you're not gaining much from it, but
also not losing much in your case.  I've seen worse wrappers suggested
here, e.g. ones that do the Logger.getLogger(...) call each time --
that's terrible ;)

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: Jain, Siddharth (ODC - Satyam) [mailto:[EMAIL PROTECTED]
Sent: Friday, October 03, 2003 2:23 AM
To: Log4J Users List
Subject: RE: Adding an abstraction level

Hi Jitesh,

I really do not think this would help you, since there is a property
known
as threshold in log4j, which specifies the minimum logging level,
thereby,
if you want that in certain deployment scenarios, or for certain
appenders,
messages should be logged above a certain level, then just specify this
property to whatever level u want, because internally, log4j checks for
the
the level being enabled or not.
I hope this helps you out.

Cheers
Siddharth


 -Original Message-
From: Jitesh_Arya [mailto:[EMAIL PROTECTED]
Sent: Friday, October 03, 2003 11:49 AM
To: Log4J Users List
Subject: Adding an abstraction level




Hi, this is my first mail to this mailing list and it's not been long
since
I subscribed to it. So, please forgive if I sound really stupid putting
forth my question(s).
What we have done is we have added another level of abstraction between
the
application (some web app) developer and the log4j. We have written
another
class that imports log4j and other classes that are required for
logging
and
written our own functions without any added functionality. That is, my
debug
will in turn
call log4j's debug method. Another thing that has been added is: the
isDebugEnabled () check before debug () of log4j is called. And
similarly,
isEnabledfor(level)
for other levels. Now, my questions:
1)  Is this added level of abstraction advisable?
2)  Does the check before the call to log4j method serve any
purpose
(here in my case) in reducing the cost? This (in normal cases, not
here)
does prevent the cost of parameter construction when implemented in
application directly (this I understand). But here, the parameters will
be
constructed, (so no savings on that side) when call is made to the
debug ()
or any other method that we have implemented. So, you see anything here
(diamond or just coal)?

A heavy lot of thanks in ADVANCE:-)

Regards,
Jitesh



This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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



RE: Adding an abstraction level

2003-10-03 Thread Lutz Michael


One other thing I would strongly encourage, purchase Ceki's book and read
the section about wrapping Log4j.  It is something that is encouraged,
however Ceki strongly recommends not sub-classing logger.  Use aggregation,
as he describes in his book.




-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
Sent: Friday, October 03, 2003 8:42 AM
To: Log4J Users List
Subject: RE: Adding an abstraction level



Howdy,
Not quite.  Using isEnabledFor(Level l), e.g. isDebugEnabled() around
logger.debug statements can significantly reduce logging overhead.  You
should read the log4j manual on this issue, as it contains a more
complete explanation and benchmarks.

As for your level of abstraction, which on this list we often refer to
as a log4j wrapper: chances are you're not gaining much from it, but
also not losing much in your case.  I've seen worse wrappers suggested
here, e.g. ones that do the Logger.getLogger(...) call each time --
that's terrible ;)

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: Jain, Siddharth (ODC - Satyam) [mailto:[EMAIL PROTECTED]
Sent: Friday, October 03, 2003 2:23 AM
To: Log4J Users List
Subject: RE: Adding an abstraction level

Hi Jitesh,

I really do not think this would help you, since there is a property
known
as threshold in log4j, which specifies the minimum logging level,
thereby,
if you want that in certain deployment scenarios, or for certain
appenders,
messages should be logged above a certain level, then just specify this
property to whatever level u want, because internally, log4j checks for
the
the level being enabled or not.
I hope this helps you out.

Cheers
Siddharth


 -Original Message-
From: Jitesh_Arya [mailto:[EMAIL PROTECTED]
Sent: Friday, October 03, 2003 11:49 AM
To: Log4J Users List
Subject: Adding an abstraction level




Hi, this is my first mail to this mailing list and it's not been long
since
I subscribed to it. So, please forgive if I sound really stupid putting
forth my question(s).
What we have done is we have added another level of abstraction between
the
application (some web app) developer and the log4j. We have written
another
class that imports log4j and other classes that are required for
logging
and
written our own functions without any added functionality. That is, my
debug
will in turn
call log4j's debug method. Another thing that has been added is: the
isDebugEnabled () check before debug () of log4j is called. And
similarly,
isEnabledfor(level)
for other levels. Now, my questions:
1)  Is this added level of abstraction advisable?
2)  Does the check before the call to log4j method serve any
purpose
(here in my case) in reducing the cost? This (in normal cases, not
here)
does prevent the cost of parameter construction when implemented in
application directly (this I understand). But here, the parameters will
be
constructed, (so no savings on that side) when call is made to the
debug ()
or any other method that we have implemented. So, you see anything here
(diamond or just coal)?

A heavy lot of thanks in ADVANCE:-)

Regards,
Jitesh



This e-mail, including any attachments, is a confidential business
communication, and may contain information that is confidential, proprietary
and/or privileged.  This e-mail is intended only for the individual(s) to
whom it is addressed, and may not be saved, copied, printed, disclosed or
used by anyone else.  If you are not the(an) intended recipient, please
immediately delete this e-mail from your computer system and notify the
sender.  Thank you.


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

---
This message and any included attachments are from Siemens Medical Solutions 
USA, Inc. and are intended only for the addressee(s).  
The information contained herein may include trade secrets or privileged or 
otherwise confidential information.  Unauthorized review, forwarding, printing, 
copying, distributing, or using such information is strictly prohibited and may 
be unlawful.  If you received this message in error, or have reason to believe 
you are not authorized to receive it, please promptly delete this message and 
notify the sender by e-mail with a copy to [EMAIL PROTECTED]  Thank you

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



log4j xml configuration

2003-10-03 Thread jeffrey_chavis
I am having problems getting log4j to configure from an XML file. 
When I use the xml file shown below, i get the following warning in 
java (1.4.1_02). Note: When I use a non-XML properties file it works 
just fine.

log4j:WARN No appenders could be found for logger 
(edu.jhuapl.latency.GNCSTlatencylog4j).

log4j:WARN Please initialize the log4j system properly.

Any ideas? Thanks in advance.

Here is the xml file
-

?xml version=1.0 encoding=UTF-8?
!DOCTYPE log4j:configuration SYSTEM log4j.dtd

log4j:configuration xmlns:log4j=http://jakarta.apache.org/log4j/;
   debug=true

!-- Console Appender --
appender name=stdout 
class=org.apache.log4j.ConsoleAppender
layout class=org.apache.log4j.PatternLayout
 param name=ConversionPattern
value=%d{ISO8601} %-5p %C{2} [%t] (%F:%
L) - %m%n/
/layout
/appender

!-- Rolling file Appender --
appender name=R 
class=org.apache.log4j.RollingFileAppender
param name=File value=log/gncst.log/
param name=MaxFileSize value=1000KB/
param name=MaxBackupIndex value=5/
layout class=org.apache.log4j.PatternLayout
 param name=ConversionPattern
value=%d{ISO8601} %-5p %C{2} [%t] (%F:%
L) - %m%n/
/layout
/appender

!-- LogFactor5 appender --
appender name=LF5_CLIENT 
class=org.apache.log4j.lf5.LF5Appender
param name=MaxNumberOfRecords value=1000/
/appender

!-- JDBC Appender --
appender name=JDBC 
class=org.apache.log4j.jdbcplus.JDBCAppender
param name=url 
value=jdbc:oracle:thin:@tofu:1521:gncst/
param name=username value=gdba/
param name=password value=gdba/
param name=sql
   value=INSERT INTO latency_log
(LATENCY_IDENTIFIER, EVENT, COMPONENT, PROCESSING_LEVEL, 
SECURITY_LEVEL, MESSAGE, TIMESTAMP) VALUES (@LATENCY_IDENTIFIER@, 
@EVENT@, @COMPONENT@, @PROCESSING_LEVEL@, @SECURITY_LEVEL@, 
@MESSAGE@, @TIMESTAMP@)/
param name=buffer value=1/
param name=commit value=Y/
layout class=org.apache.log4j.PatternLayout
 param name=ConversionPattern
value=%d{ISO8601} %-5p %C{2} [%t] (%F:%
L) - %m%n/
/layout
/appender

!-- Root debugger --
root
priority value=debug/
appender-ref ref=stdout/
appender-ref ref=R/
appender-ref ref=LF5_CLIENT/
appender-ref ref=JDBC/
/root

/log4j:configuration




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



RE: log4j using appender but not specified pattern

2003-10-03 Thread Mock, Jeffrey
Tom,

I'm wondering if the custom trace level 'OurLogLevel' overrides all of
the necessary methods in order to accurately identify trace as a valid
Level.  I experience the same problem you are having when I attempted to
add a custom level.  Does the OurLogLevel class have 'overrides' for the
toLevel() methods?

Jeff

-Original Message-
From: tom ONeill [mailto:[EMAIL PROTECTED] 
Sent: Friday, October 03, 2003 4:37 AM
To: [EMAIL PROTECTED]
Subject: log4j using appender but not specified pattern

Hi all,

I was wondering if anyone could give me some ideas on what might be
causing 
a small problem that I have. In my log4j properties file (XML format) I
have 
set up a particular appender that writes to a file. I have also
specified a 
particular Pattern for the appender. Now the logging entries are being 
written to the appender but are not using the pattern that I specified.

The appender is specified in the logging file as follows

appender name=PerfAppender class=org.apache.log4j.FileAppender
param name=File   value=Perf.log /
param name=Append value=true /
layout class=org.apache.log4j.PatternLayout
   param name=ConversionPattern value=%d - %m%n/
/layout
/appender

This appender is then associated with a a particular logger as follows:

logger name=MainLog
level class=de.start.sip.tools.logging.OurLogLevel 
value=trace/
appender-ref ref=PerfAppender /
/logger


When I execute my application the Perf.log file is being written however
it 
does not include the datetime which I would expect from using %d in the 
specified pattern for the appender. Not all the code is my own so its 
possible that there is somthing going on that I dont know about but what
I 
need to know is the possible ways in which an appender could be used
without 
actually using the specified pattern?

Thanks,

Tom

_
The new MSN 8: advanced junk mail protection and 2 months FREE* 
http://join.msn.com/?page=features/junkmail


-
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: Chaining

2003-10-03 Thread Jacob Kjome
At 04:03 AM 10/3/2003 -0500, you wrote:
What is NDC?
http://nagoya.apache.org/wiki/apachewiki.cgi?Log4JProjectPages/NDCvsMDC

Jake

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


Re: log4j xml configuration

2003-10-03 Thread Jacob Kjome
At 03:43 PM 10/3/2003 +, you wrote:
I am having problems getting log4j to configure from an XML file.
When I use the xml file shown below, i get the following warning in
java (1.4.1_02). Note: When I use a non-XML properties file it works
just fine.
log4j:WARN No appenders could be found for logger
(edu.jhuapl.latency.GNCSTlatencylog4j).
log4j:WARN Please initialize the log4j system properly.

Any ideas? Thanks in advance.
Try removing all appenders except for the console appender from the root 
logger and see it works.  Reducing the extraneous variables will help 
pinpoint the problem more efficiently.  Also, I assume you had put 
log4j.properties in the classpath and let log4j load it automatically.  I 
imagine you did the same for log4j.xml.  I think Log4j loads properties 
files preferentially to XML files (I could be wrong here).  Given that, it 
is possible that there were no other log4j.properties files in the 
classpath other than yours, but there may have been another log4j.xml file 
in the classpath that might be overriding yours.  That's just a shot in the 
dark as to why it worked with the properties file and not the XML file.

BTW, you should use level rather than priority.

Jake


Here is the xml file
-
?xml version=1.0 encoding=UTF-8?
!DOCTYPE log4j:configuration SYSTEM log4j.dtd
log4j:configuration xmlns:log4j=http://jakarta.apache.org/log4j/;
   debug=true
!-- Console Appender --
appender name=stdout
class=org.apache.log4j.ConsoleAppender
layout class=org.apache.log4j.PatternLayout
 param name=ConversionPattern
value=%d{ISO8601} %-5p %C{2} [%t] (%F:%
L) - %m%n/
/layout
/appender
!-- Rolling file Appender --
appender name=R
class=org.apache.log4j.RollingFileAppender
param name=File value=log/gncst.log/
param name=MaxFileSize value=1000KB/
param name=MaxBackupIndex value=5/
layout class=org.apache.log4j.PatternLayout
 param name=ConversionPattern
value=%d{ISO8601} %-5p %C{2} [%t] (%F:%
L) - %m%n/
/layout
/appender
!-- LogFactor5 appender --
appender name=LF5_CLIENT
class=org.apache.log4j.lf5.LF5Appender
param name=MaxNumberOfRecords value=1000/
/appender
!-- JDBC Appender --
appender name=JDBC
class=org.apache.log4j.jdbcplus.JDBCAppender
param name=url
value=jdbc:oracle:thin:@tofu:1521:gncst/
param name=username value=gdba/
param name=password value=gdba/
param name=sql
   value=INSERT INTO latency_log
(LATENCY_IDENTIFIER, EVENT, COMPONENT, PROCESSING_LEVEL,
SECURITY_LEVEL, MESSAGE, TIMESTAMP) VALUES (@LATENCY_IDENTIFIER@,
@EVENT@, @COMPONENT@, @PROCESSING_LEVEL@, @SECURITY_LEVEL@,
@MESSAGE@, @TIMESTAMP@)/
param name=buffer value=1/
param name=commit value=Y/
layout class=org.apache.log4j.PatternLayout
 param name=ConversionPattern
value=%d{ISO8601} %-5p %C{2} [%t] (%F:%
L) - %m%n/
/layout
/appender
!-- Root debugger --
root
priority value=debug/
appender-ref ref=stdout/
appender-ref ref=R/
appender-ref ref=LF5_CLIENT/
appender-ref ref=JDBC/
/root
/log4j:configuration



-
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 xml configuration

2003-10-03 Thread Ceki Gülcü
At 12:11 PM 10/3/2003 -0500, you wrote:
At 03:43 PM 10/3/2003 +, you wrote:
I am having problems getting log4j to configure from an XML file.
When I use the xml file shown below, i get the following warning in
java (1.4.1_02). Note: When I use a non-XML properties file it works
just fine.
log4j:WARN No appenders could be found for logger
(edu.jhuapl.latency.GNCSTlatencylog4j).
log4j:WARN Please initialize the log4j system properly.

Any ideas? Thanks in advance.
Try removing all appenders except for the console appender from the root 
logger and see it works.  Reducing the extraneous variables will help 
pinpoint the problem more efficiently.  Also, I assume you had put 
log4j.properties in the classpath and let log4j load it automatically.  I 
imagine you did the same for log4j.xml.  I think Log4j loads properties 
files preferentially to XML files (I could be wrong here).
Actually, it's log4j.xml first and log4j.properties second. Of course, this 
does not help in hunting down the problem.

--
Ceki Gülcü
 For log4j documentation consider The complete log4j manual
 ISBN: 2970036908 http://www.qos.ch/shop/products/clm_t.jsp
 import org.apache.Facetime;
 ApacheCon US 2003, 18-21 November http://apachecon.com/


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


org.apache.log4j.DailyRollingFileAppender

2003-10-03 Thread Clare . Myers
My java application running on AIX uses the DailyRollingFileAppender.
Every so often, the roll-over does not occur at midnight, but later.
Perhaps even a day later.  Has anyone experienced this problem?

Thanks!
Clare H. Myers
Application Developer Advisor
Anthem - AMMS
(513) 336-5472




CONFIDENTIALITY NOTICE: This e-mail message, including any attachments, 
is for the sole use of the intended recipient(s) and may contain confidential
and privileged information or otherwise protected by law.  Any unauthorized
review, use, disclosure or distribution is prohibited.  If you are not the
intended recipient, please contact the sender by reply e-mail and destroy
all copies of the original message.

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



RE: org.apache.log4j.DailyRollingFileAppender

2003-10-03 Thread Shapira, Yoav

Howdy,
Yes.

Search the archives.

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Friday, October 03, 2003 3:00 PM
To: [EMAIL PROTECTED]
Subject: org.apache.log4j.DailyRollingFileAppender

My java application running on AIX uses the DailyRollingFileAppender.
Every so often, the roll-over does not occur at midnight, but later.
Perhaps even a day later.  Has anyone experienced this problem?

Thanks!
Clare H. Myers
Application Developer Advisor
Anthem - AMMS
(513) 336-5472




CONFIDENTIALITY NOTICE: This e-mail message, including any attachments,
is for the sole use of the intended recipient(s) and may contain
confidential
and privileged information or otherwise protected by law.  Any
unauthorized
review, use, disclosure or distribution is prohibited.  If you are not
the
intended recipient, please contact the sender by reply e-mail and
destroy
all copies of the original message.

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




This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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



org.apache.log4j.Logger

2003-10-03 Thread Lummis, Patrick J


Hi,

I'm trying to understand the hierarchy in log4j.

If I do the following:

Logger x = Logger.getLogger(com.apples)
Logger y = Logger.getLogger(com.oranges)

Will I get references to two distinct Logger objects?

Patrick Lummis

This message (including any attachments) may contain confidential information intended 
for a specific individual and purpose. If you are not the intended recipient, delete 
this message. If you are not the intended recipient, disclosing, copying, 
distributing, or taking any action based on this message is strictly prohibited.


RE: org.apache.log4j.Logger

2003-10-03 Thread Shapira, Yoav

Howdy,
Yes.  The name is a unique identifier for a logger instance (within a
loger repository).

Logger.getLogger(com);
Logger.getLogger(com.foo);
Logger.getLogger(com.bar);
All return different Logger instances.

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: Lummis, Patrick J [mailto:[EMAIL PROTECTED]
Sent: Friday, October 03, 2003 3:08 PM
To: [EMAIL PROTECTED]
Subject: org.apache.log4j.Logger



Hi,

I'm trying to understand the hierarchy in log4j.

If I do the following:

Logger x = Logger.getLogger(com.apples)
Logger y = Logger.getLogger(com.oranges)

Will I get references to two distinct Logger objects?

Patrick Lummis

This message (including any attachments) may contain confidential
information intended for a specific individual and purpose. If you are
not
the intended recipient, delete this message. If you are not the
intended
recipient, disclosing, copying, distributing, or taking any action
based on
this message is strictly prohibited.



This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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



Re: log4j xml configuration

2003-10-03 Thread jeffrey_chavis
OK, I added a file named log4j.xml to a directory in the classpath 
and this works wonderfully.

The next question is I want to use the PropertyConfigurator to load a 
named config file. When I pass the PropertyConfigurator a non-xml 
file it works, but if I pass it an xml file it does not. Is there 
something I need to do in the PropertConfigurator to get it to load 
an XML file 

Here is the code i use to pass the filename to the 
PropertyConfigurator 

String userDir = System.getProperty(user.dir,test);
String fileSeparator = System.getProperty(file.separator);
String filename = userDir +
  fileSeparator +
  config +
  fileSeparator +
  Sync_GNCST_Latency_config;

// use the Property Configurator to configure log file.
PropertyConfigurator.configure(filename);

Jeff



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



RE: org.apache.log4j.DailyRollingFileAppender

2003-10-03 Thread Clare . Myers

I found alot of things about how to get the DailyRollingFileAppender to
roll at a scheduled time instead of when a record is written.  The problem
that I am having is that the rollover is not happening when a record is
written after the date changes.

Thanks!
Clare H. Myers
Application Developer Advisor
Anthem - AMMS
(513) 336-5472


   

  Shapira, Yoav  

  [EMAIL PROTECTED]To:   Log4J Users List [EMAIL 
PROTECTED]
  .comcc: 

   Subject:  RE: 
org.apache.log4j.DailyRollingFileAppender 
  10/03/2003 03:02 

  PM   

  Please respond to

  Log4J Users 

  List

   

   






Howdy,
Yes.

Search the archives.

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Friday, October 03, 2003 3:00 PM
To: [EMAIL PROTECTED]
Subject: org.apache.log4j.DailyRollingFileAppender

My java application running on AIX uses the DailyRollingFileAppender.
Every so often, the roll-over does not occur at midnight, but later.
Perhaps even a day later.  Has anyone experienced this problem?

Thanks!
Clare H. Myers
Application Developer Advisor
Anthem - AMMS
(513) 336-5472




CONFIDENTIALITY NOTICE: This e-mail message, including any attachments,
is for the sole use of the intended recipient(s) and may contain
confidential
and privileged information or otherwise protected by law.  Any
unauthorized
review, use, disclosure or distribution is prohibited.  If you are not
the
intended recipient, please contact the sender by reply e-mail and
destroy
all copies of the original message.

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




This e-mail, including any attachments, is a confidential business
communication, and may contain information that is confidential,
proprietary and/or privileged.  This e-mail is intended only for the
individual(s) to whom it is addressed, and may not be saved, copied,
printed, disclosed or used by anyone else.  If you are not the(an) intended
recipient, please immediately delete this e-mail from your computer system
and notify the sender.  Thank you.


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








CONFIDENTIALITY NOTICE: This e-mail message, including any attachments, 
is for the sole use of the intended recipient(s) and may contain confidential
and privileged information or otherwise protected by law.  Any unauthorized
review, use, disclosure or distribution is prohibited.  If you are not the
intended recipient, please contact the sender by reply e-mail and destroy
all copies of the original message.

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