RE: Appender per Logger

2003-06-11 Thread Vivek Kapadekar
similarly, how do I add ( attach ) appenders to a AsyncAppender in a props file? I have this defined in the props file and I want to append by own appender SOAPAppender to this. log4j.appender.A1=org.apache.log4j.AsyncAppender Thanks -Viv On Wed, 2003-06-11 at 16:36, Ebersole, Steven wrote:

RE: Duplicate Triggering of custom appender.

2003-06-11 Thread Ebersole, Steven
No problem -Original Message- From: Vivek Kapadekar [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 11, 2003 7:17 PM To: Log4J Users List Subject: RE: Duplicate Triggering of custom appender. Yup that worked, I think i had not set the additivity flag right.. Thanks for your help --Viv

RE: Duplicate Triggering of custom appender.

2003-06-11 Thread Vivek Kapadekar
Yup that worked, I think i had not set the additivity flag right.. Thanks for your help --Viv On Wed, 2003-06-11 at 16:54, Ebersole, Steven wrote: Try the following just to see if you still get the same issue (and do _not_ programatically add the appender): ###

RE: Duplicate Triggering of custom appender.

2003-06-11 Thread Ebersole, Steven
Try the following just to see if you still get the same issue (and do _not_ programatically add the appender): ## # Define loggers ## log4j.rootLogger=debug, st

RE: Duplicate Triggering of custom appender.

2003-06-11 Thread Vivek Kapadekar
to SYSTEM, AUDIT and TRANSACTION On Wed, 2003-06-11 at 16:41, Ebersole, Steven wrote: To which loggers? -Original Message- From: Vivek Kapadekar [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 11, 2003 6:39 PM To: Log4J Users List Subject: RE: Duplicate Trigge

RE: Appender per Logger

2003-06-11 Thread Vivek Kapadekar
Ok. I tried specifying the appender in the lo4j.properties. I have set the additivity flag to false. Still I get duplicate hits to my appender ...Do I need to implement the close() method in my appender. Does that make a diference...? --Viv On Wed, 2003-06-11 at 16:36, Ebersole, Steven wrote:

RE: Duplicate Triggering of custom appender.

2003-06-11 Thread Ebersole, Steven
To which loggers? -Original Message- From: Vivek Kapadekar [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 11, 2003 6:39 PM To: Log4J Users List Subject: RE: Duplicate Triggering of custom appender. Hi The name of the appender I want to use is SOAPAppender and I add it programmatically t

RE: Duplicate Triggering of custom appender.

2003-06-11 Thread Vivek Kapadekar
Hi The name of the appender I want to use is SOAPAppender and I add it programmatically to the logger instances. log4j.rootLogger=debug log4j.appender.stdout=org.apache.log4j.ConsoleAppender log4j.appender.stdout.layout=org.apache.log4j.PatternLayout # Pattern to output the caller's file name an

RE: Appender per Logger

2003-06-11 Thread Ebersole, Steven
In props: ## log4j.rootLogger=DEBUG,appender1 log4j.logger.specificLogger1=DEBUG,appender2 log4j.logger.specificLogger2=DEBUG,appender3 log4j.appender.appender1=... log4j.appender.appender2=... log4j.appender.appender3=... In XML:

RE: Duplicate Triggering of custom appender.

2003-06-11 Thread Ebersole, Steven
What's your config look like? -Original Message- From: Vivek Kapadekar [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 11, 2003 5:30 PM To: Log4J Users List Subject: RE: Duplicate Triggering of custom appender. i have set it to false for that particular Logger instance. On Wed, 2003-0

Appender per Logger

2003-06-11 Thread Vivek Kapadekar
hi This might be a basic question. How do I specify a different appender per logger, the way we specify log levels for individual loggers? Thanks --Viv

RE: Duplicate Triggering of custom appender.

2003-06-11 Thread Vivek Kapadekar
i have set it to false for that particular Logger instance. On Wed, 2003-06-11 at 15:22, Ebersole, Steven wrote: Make sure you dont have an additivity issue. -Original Message- From: Vivek Kapadekar [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 11, 2003

RE: Duplicate Triggering of custom appender.

2003-06-11 Thread Ebersole, Steven
Make sure you dont have an additivity issue. -Original Message- From: Vivek Kapadekar [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 11, 2003 5:21 PM To: [EMAIL PROTECTED] Cc: Log4J Users List Subject: Re: Duplicate Triggering of custom appender. Hi Below is the appender code. As yo

Re: Duplicate Triggering of custom appender.

2003-06-11 Thread Vivek Kapadekar
Hi Below is the appender code. As you see there is not a lot of implementation details in the appender. The append() method gets triggered twice the number of times I log messages... public class SOAPAppender extends AppenderSkeleton implements org.apache.log4j.Appender { /** * A static Obj

Re: Duplicate Triggering of custom appender.

2003-06-11 Thread Yoav Shapira
Howdy, It would be easier (for me at least ;)) to diagnose your problem if you post the source code to your appender... Yoav Shapira --- Vivek Kapadekar <[EMAIL PROTECTED]> wrote: > Hi > I have written my own simple appender ( this is the first time I am > writing an appender). I attach the appe

Duplicate Triggering of custom appender.

2003-06-11 Thread Vivek Kapadekar
Hi I have written my own simple appender ( this is the first time I am writing an appender). I attach the appender to the Logger using addAppender(). In my client class I log six messages, but what the appenders append() method gets triggered 12 times. I thought it might be due to the hierarchy ,

Configure Different Log File for a Class

2003-06-11 Thread Michael Schaefer
I have the following settings in my log4j.properties file: log4j.rootLogger=DEBUG, stdout, normal log4j.logger.SomeUniqueString=DEBUG, requestLog # Setup stdout appender log4j.appender.stdout=org.apache.log4j.ConsoleAppender log4j.appender.stdout.layout=org.apache.log4j.PatternLayout log4j.append

log4cxx

2003-06-11 Thread Michael CATANZARITI
Good evening, I'd like to announce a new port to C++ of the log4j project : log4cxx (http://sourceforge.net/projects/log4cxx) Supported features : Appenders: AsyncAppender, SocketAppender, SocketHubAappender, TelnetAp

RE: Problem configuring log4j with common classes

2003-06-11 Thread Alison Ortega
What you have looks right, just do a static initializer block in your common classes like this: ... code to get the init file name and prefix ... static { PropertyConfigurator.configure(prefix+file); } It goes in the class/instance data declarations section of your common class. I suppose you cou

RE: Calling method not showing

2003-06-11 Thread Scott Burns
Once again thanks :) Scott -Original Message- From: Inderdeep Dhir [mailto:[EMAIL PROTECTED] Sent: Monday, June 09, 2003 4:09 AM To: Log4J Users List Subject: RE: Calling method not showing Hi Scott, Your debug log methods in LoggerWrapper should look like this... public void de

RE: Problem configuring log4j with common classes

2003-06-11 Thread Carlos Roberto Yaconi Hitschfeld
Upss.. I think I'm a little bit newbie for your answer. Maybe It could be more useful to me if I show you what, and how I'm doing now, and from it you give some guidelines on how to complete my work... Could you?? Let's see... I use properties to configure, not XML. Here is an extract of the com

RE: Problem configuring log4j with common classes

2003-06-11 Thread Alison Ortega
Sure. Here's the basic structure imports... public class CommonClass { class/instance data declarations... static { DOMConfigurator.configureAndWatch(logInitFile); } methods... } where logInitFile is an xml file that only declares the root category and appenders. http://jakarta.apache.org/log

RE: Problem configuring log4j with common classes

2003-06-11 Thread Carlos Roberto Yaconi Hitschfeld
Thanks, but can you give some code examples of your implementation??. Now we are using the servlet init for our web applications, but I'm a little confused with the static init for the common classes. Thank you very much! Best Regards. Carlos Yaconi Hitschfeld -Mensaje original- De: A

Re: Problem configuring log4j with common classes

2003-06-11 Thread Alison Ortega
I have a similar scenario - what I ended up doing is running an init (configure method) in an init servlet for each application and a static init in my common classes. The root appender is configured in my common classes, and each app has it's own category(ies)/appenders. Since each time you run

RE: seeking guidance - wrapping Log4j

2003-06-11 Thread Lutz Michael
Thanks to everyone for your input. This helps a lot, and I will be sure to read through my copy of the Manual in this regard. Thanks! Mike -Original Message- From: Ceki Gülcü [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 11, 2003 11:29 AM To: Log4J Users List Subject: Re: seeking

Problem configuring log4j with common classes

2003-06-11 Thread Carlos Roberto Yaconi Hitschfeld
Hi! I'm currently developing applications for a big enterprise, which consist on common classes that has our own connection framework (middleware), to a proprietary back-end system, and a lot of different web applications that has is own logic, and uses this common connector. My trouble is when

Re: seeking guidance - wrapping Log4j

2003-06-11 Thread Ceki Gülcü
Hello Mike, This question is answered in some detail in "The complete log4j manual. If my memory serves me right, you have already ordered this book. To gist of the answer is that once a logger is created it is bound to the hierarchy. If a logger of name 'foo' and type X is created, it cannot be r

RE: seeking guidance - wrapping Log4j

2003-06-11 Thread Keith Hatton
Not sure this is really a "technical" reason, but the GoF Design Patterns book recommends "favour aggregation over inheritance". I don't have it to hand but I think the reason might be that by extending a class, there is always scope to break the contract implemented by the superclass. By aggreg

RE: seeking guidance - wrapping Log4j

2003-06-11 Thread Shapira, Yoav
Howdy, You might also find this document useful: http://www.qos.ch/logging/thinkAgain.html Yoav Shapira Millennium ChemInformatics >-Original Message- >From: Lutz Michael [mailto:[EMAIL PROTECTED] >Sent: Wednesday, June 11, 2003 10:51 AM >To: '[EMAIL PROTECTED]' >Cc: Agassi Emin >Subjec

seeking guidance - wrapping Log4j

2003-06-11 Thread Lutz Michael
I receive regular questions from internal customers asking why it is recommended to wrap Log4j through aggregation as opposed to inheritance. I am familiar with the ClassCastException issue found in http://jakarta.apache.org/log4j/docs/TROUBLESHOOT.html#cce. I have purchased the Log4j Full Manu

RE: Log4J and NT2000

2003-06-11 Thread Farrell, Timothy
Thanks Greg! I'll give that a try. -Tim -Original Message- From: Gregory Knapen (LMC) [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 11, 2003 9:46 AM To: 'Log4J Users List' Subject: RE: Log4J and NT2000 I have had similar problems with Tomcat 4.1.18. In my case, all my logs were redi

RE: Log4J and NT2000

2003-06-11 Thread Gregory Knapen (LMC)
I have had similar problems with Tomcat 4.1.18. In my case, all my logs were redirected to catalina.out and the log4j.properties was not read. The solution was to upgrade to Tomcat 4.1.24 (or higher). Greg K. -Original Message- From: Farrell, Timothy [mailto:[EMAIL PROTECTED] Sent:

Log4J and NT2000

2003-06-11 Thread Farrell, Timothy
I currently have an instance of Tomcat 4.1.18 running on NT2000. I have installed Log4J as well in order to record some low level statistics on a particular application. The problem I am having is that if I start Tomcat via a DOS prompt, Log4J loads up normally without issue. If Tomcat is setup v