RE : I don't like the word "FATAL"
Hi, You could create your own level with the same priority than Level.FATAL Ionel --- Bret Schuhmacher <[EMAIL PROTECTED]> a écrit : > There are messages I want to print all the time, > such as entry/exit into > main(), regardless what threshold the user has set. > I've been doing > this with logger.fatal(). Unfortunately, this > prints "FATAL" in your > simple message, which alarms the *hell* out of > customers. Even though > the message says something innocuous like "Entering > main - processing > beginning", I've had customers require huge > write-ups explaining that > FATAL isn't actually a FATAL error. Is there a way > to either change the > word "FATAL" or get a message to print in all > circumstances without the > word FATAL appearing? As I'm writing this, I'm all > of a sudden thinking > that I could use a different logger with a different > conversionpattern, > one without the level in it. Is that how others do > this? > > Thanks! > > Bret > > > - > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > > ___ Découvrez une nouvelle façon d'obtenir des réponses à toutes vos questions ! Profitez des connaissances, des opinions et des expériences des internautes sur Yahoo! Questions/Réponses http://fr.answers.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
use both programmatic and file configuration
Hi, I'd like to provide a way to add loggers/appenders to log4j whereas I have already configured it programmaticaly with a default, unremoveable appender. That is, I have a ConsoleAppender or FileAppender (defined in code) and I'd like to allow the user to add an SMTPAppender if he wants to. How could I archieve this ? Does the fact that the user provides a log4j configuration file annihilate the programmatic part ? thanks, Ionel Vous manquez despace pour stocker vos mails ? Yahoo! Mail vous offre GRATUITEMENT 100 Mo ! Créez votre Yahoo! Mail sur http://fr.benefits.yahoo.com/ Le nouveau Yahoo! Messenger est arrivé ! Découvrez toutes les nouveautés pour dialoguer instantanément avec vos amis. A télécharger gratuitement sur http://fr.messenger.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
daily rolling + max file size
Hi, Is it possible to use the maximumFileSize property along with a DailyRollingFileAppender ? The file would then be rolled daily and if its size is more than maximumFileSize in the day, it is renamed to XXX.-MM-dd.index Thanks, Ionel Vous manquez despace pour stocker vos mails ? Yahoo! Mail vous offre GRATUITEMENT 100 Mo ! Créez votre Yahoo! Mail sur http://fr.benefits.yahoo.com/ Le nouveau Yahoo! Messenger est arrivé ! Découvrez toutes les nouveautés pour dialoguer instantanément avec vos amis. A télécharger gratuitement sur http://fr.messenger.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
muting appenders
Hi, Sorry for the repost, I may have missed your answers. I have two appenders : ConsoleAppender and FileAppender. These two appenders are attached to a unique logger. Is there a way to "mute" a logger or the other "on the fly" so I can log on Console only, FileAppender only or both ? BTW, my logging initialization is like this : Logger log4jLogger = null; static { Layout patternLayout = new PatternLayout("%d [%t] %-5p - %m%n"); Appender consoleAppender = new ConsoleAppender(patternLayout); log4jLogger = Logger.getLogger("myClass"); log4jLogger.addAppender(consoleAppender); log4jLogger.setLevel(Level.ALL); } As i am adapting a proprietary logging API to Log4j, this is the only initialization part I am going thru. Classes never reference the log4jLogger logger. According to this, what about the rootLogger ? What are its configuration values (appenders, level) ? Should I better use log4jLogger = Logger.getRootLogger(); instead of log4jLogger = Logger.getLogger("myClass"); in order to init only the root logger ? Ionel Vous manquez despace pour stocker vos mails ? Yahoo! Mail vous offre GRATUITEMENT 100 Mo ! Créez votre Yahoo! Mail sur http://fr.benefits.yahoo.com/ Le nouveau Yahoo! Messenger est arrivé ! Découvrez toutes les nouveautés pour dialoguer instantanément avec vos amis. A télécharger gratuitement sur http://fr.messenger.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
switching between two appenders
Hi, I have two appenders : ConsoleAppender and FileAppender. These two appenders are attached to a unique logger. Is there a way to "mute" a logger or the other "on the fly" so I can log on Console only, FileAppender only or both ? BTW, my logging initialization is like this : Logger log4jLogger = null; static { Layout patternLayout = new PatternLayout("%d [%t] %-5p - %m%n"); Appender consoleAppender = new ConsoleAppender(patternLayout); log4jLogger = Logger.getLogger("myClass"); log4jLogger.addAppender(consoleAppender); log4jLogger.setLevel(Level.ALL); } As i am adapting a proprietary logging API to Log4j, this is the only initialization part I am going thru. Classes never reference the log4jLogger logger. According to this, what about the rootLogger ? What are its configuration values (appenders, level) ? Should I better use log4jLogger = Logger.getRootLogger(); instead of log4jLogger = Logger.getLogger("myClass"); in order to init only the root logger ? Thanks for your answers, Ionel Vous manquez despace pour stocker vos mails ? Yahoo! Mail vous offre GRATUITEMENT 100 Mo ! Créez votre Yahoo! Mail sur http://fr.benefits.yahoo.com/ Le nouveau Yahoo! Messenger est arrivé ! Découvrez toutes les nouveautés pour dialoguer instantanément avec vos amis. A télécharger gratuitement sur http://fr.messenger.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
dynamic graphical configuration interface
Hi, Has anyone ever developped a GUI for managing loggers and appenders ? Some kind of RMI connection to a configurator stub inside the managed application. This will show a JTree with loggers on the left, a list of appenders on the center and the configuration parameters on the rigth. Could it be usefull to develop this ? thanks, ionel Vous manquez despace pour stocker vos mails ? Yahoo! Mail vous offre GRATUITEMENT 100 Mo ! Créez votre Yahoo! Mail sur http://fr.benefits.yahoo.com/ Le nouveau Yahoo! Messenger est arrivé ! Découvrez toutes les nouveautés pour dialoguer instantanément avec vos amis. A télécharger gratuitement sur http://fr.messenger.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: maintaining the Frequently Asked Questions
not yet. As I started this a few days ago, only the intro part is already traducted. i did not traduct the Apache licence stuff (should I ?) and the Kernigan/Pike quote. FYI, I attach the html file. Layout is the same as the original file. Vous manquez despace pour stocker vos mails ? Yahoo! Mail vous offre GRATUITEMENT 100 Mo ! Créez votre Yahoo! Mail sur http://fr.benefits.yahoo.com/ Le nouveau Yahoo! Messenger est arrivé ! Découvrez toutes les nouveautés pour dialoguer instantanément avec vos amis. A télécharger gratuitement sur http://fr.messenger.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: maintaining the Frequently Asked Questions
Not about the wiki thing : I am currently traducting the short log4j manual in french (spanish and german are already available) As I do this in my spare time (at work obviously), it takes quite a long ... Vous manquez despace pour stocker vos mails ? Yahoo! Mail vous offre GRATUITEMENT 100 Mo ! Créez votre Yahoo! Mail sur http://fr.benefits.yahoo.com/ Le nouveau Yahoo! Messenger est arrivé ! Découvrez toutes les nouveautés pour dialoguer instantanément avec vos amis. A télécharger gratuitement sur http://fr.messenger.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
catching System.out and System.err into log4j
Hi there, Someone else askes this but I did not saw any response. Is it possible to seemlessly catch System.out and System.err and redirect to log4j ? thanks, ionel Vous manquez despace pour stocker vos mails ? Yahoo! Mail vous offre GRATUITEMENT 100 Mo ! Créez votre Yahoo! Mail sur http://fr.benefits.yahoo.com/ Le nouveau Yahoo! Messenger est arrivé ! Découvrez toutes les nouveautés pour dialoguer instantanément avec vos amis. A télécharger gratuitement sur http://fr.messenger.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [Q] -Dlog4j.defaultInitOverride=true in Java Webstart?
Strange behavior. I am using to trace log4j and to use a custom configuration file. it works fine for me ... Vous manquez despace pour stocker vos mails ? Yahoo! Mail vous offre GRATUITEMENT 100 Mo ! Créez votre Yahoo! Mail sur http://fr.benefits.yahoo.com/ Le nouveau Yahoo! Messenger est arrivé ! Découvrez toutes les nouveautés pour dialoguer instantanément avec vos amis. A télécharger gratuitement sur http://fr.messenger.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Why does %L output as a question mark?
As wrote in Zellyn's link : you can add parameter to the javac task : debug="on" debuglevel="lines,vars,source" I can't guaranty the behavior if used along with optimization="on" (never dig into bytecode to see if optimization is still performed when debug/debuglevel is forced) --- Allistair Crossley <[EMAIL PROTECTED]> a écrit : > I am compiling using an Ant javac element if that > makes a difference? Thank you!! > > > > fork="yes" > executable="${local.javac}" > > classpath="${server.test.lib.classpath};${server.test.iq2.classes}" > > srcdir="${local.src}" > destdir="${server.test.iq2.classes}" > /> > > > > > > > > > > > > > > -Original Message- > > From: Ionel GARDAIS [mailto:[EMAIL PROTECTED] > > Sent: 29 June 2004 14:30 > > To: Log4J Users List > > Subject: Re: Why does %L output as a question > mark? > > > > > > Hi, > > > > Did you compile with optimization on ? > > > > optimization removes lines numbers unless debug is > on > > and debuglevel is set to lines,vars,source. > > > > actually, I don't know if there is still > optimization > > if you force debug and debuglevel ... > > > > ionel > > > > --- Allistair Crossley > <[EMAIL PROTECTED]> a > > écrit : > I've searched Google without success on > this > > issue. > > > I am getting question marks where the line > number > > > should be in my log files. My setup is as > follows; > > > > > > > > > log4j.logger.com.cmp.newmedia.intranet.iq.logic.schedules=debug, > > > SchedulesA > > > > > > log4j.appender.SchedulesA=org.apache.log4j.DailyRollingFileAppender > > > > > > log4j.appender.SchedulesA.File=d:/iq/logs/schedules.log > > > > > > log4j.appender.SchedulesA.layout=org.apache.log4j.PatternLayout > > > > > > log4j.appender.SchedulesA.layout.ConversionPattern=%d{ABSOLUTE} > > > %5p %c{1}:%L - %m%n > > > > log4j.appender.SchedulesA.DatePattern=.-MM-dd > > > > > > In my ScheduleLogic class in package > > > com.cmp.newmedia.intranet.iq.logic.schedules I > get > > > the logger as follows; > > > > > > static Logger logger = > > > Logger.getLogger(ScheduleLogic.class); > > > > > > and call it; > > > > > > logger.debug("list"); > > > > > > My statements come out as follows; > > > > > > 14:09:40,392 DEBUG ScheduleLogic:? - list > > > > > > This seems to be a widespread problem in all my > logs > > > but I run other software like Hibernate which > > > manages to get line numbers into my logs using > the > > > same pattern! > > > > > > Your help appreciated, ADC. > > > > > > > > > > > > > > > --- > > > QAS Ltd. > > > Developers of QuickAddress Software > > > http://www.qas.com";>www.qas.com > > > Registered in England: No 2582055 > > > Registered in Australia: No 082 851 474 > > > > > > --- > > > > > > > > > > > > > > > - > > > To unsubscribe, e-mail: > > > [EMAIL PROTECTED] > > > For additional commands, e-mail: > > > [EMAIL PROTECTED] > > > > > > > > > > > > > > > > > > > > Créez gratuitement votre Yahoo! Mail avec 100 Mo > de stockage ! > > Créez votre Yahoo! Mail sur > http://fr.benefits.yahoo.com/ > > > > Dialoguez en direct avec vos amis grâce à Yahoo! > Messenger > > !Téléchargez Yahoo! Messenger sur > http://fr.messenger.yahoo.com > > > > > - > > 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] > > Créez gratuitement votre Yahoo! Mail avec 100 Mo de stockage ! Créez votre Yahoo! Mail sur http://fr.benefits.yahoo.com/ Dialoguez en direct avec vos amis grâce à Yahoo! Messenger !Téléchargez Yahoo! Messenger sur http://fr.messenger.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Why does %L output as a question mark?
Hi, Did you compile with optimization on ? optimization removes lines numbers unless debug is on and debuglevel is set to lines,vars,source. actually, I don't know if there is still optimization if you force debug and debuglevel ... ionel --- Allistair Crossley <[EMAIL PROTECTED]> a écrit : > I've searched Google without success on this issue. > I am getting question marks where the line number > should be in my log files. My setup is as follows; > > log4j.logger.com.cmp.newmedia.intranet.iq.logic.schedules=debug, > SchedulesA > log4j.appender.SchedulesA=org.apache.log4j.DailyRollingFileAppender > log4j.appender.SchedulesA.File=d:/iq/logs/schedules.log > log4j.appender.SchedulesA.layout=org.apache.log4j.PatternLayout > log4j.appender.SchedulesA.layout.ConversionPattern=%d{ABSOLUTE} > %5p %c{1}:%L - %m%n > log4j.appender.SchedulesA.DatePattern=.-MM-dd > > In my ScheduleLogic class in package > com.cmp.newmedia.intranet.iq.logic.schedules I get > the logger as follows; > > static Logger logger = > Logger.getLogger(ScheduleLogic.class); > > and call it; > > logger.debug("list"); > > My statements come out as follows; > > 14:09:40,392 DEBUG ScheduleLogic:? - list > > This seems to be a widespread problem in all my logs > but I run other software like Hibernate which > manages to get line numbers into my logs using the > same pattern! > > Your help appreciated, ADC. > > > > --- > QAS Ltd. > Developers of QuickAddress Software > http://www.qas.com";>www.qas.com > Registered in England: No 2582055 > Registered in Australia: No 082 851 474 > --- > > > > - > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > > Créez gratuitement votre Yahoo! Mail avec 100 Mo de stockage ! Créez votre Yahoo! Mail sur http://fr.benefits.yahoo.com/ Dialoguez en direct avec vos amis grâce à Yahoo! Messenger !Téléchargez Yahoo! Messenger sur http://fr.messenger.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: announce Level
Hi Marc, I don't really get why do you need this ANNOUNCEment level. If a process does not start at all, you get no messages. If a process starts with errors or warnings, the team is notified. If a process starts successfully, then none of the things above occured. However, couldn't the last INFO message of your startup sequence contain a special NDC to tell that everything is OK or not ? Then you could create an appender which react to this NDC only ... (since I am not a log4j power user, I might be mistaken but this is how I would implement this if I had to do it) = -- Regards, Ionel Yahoo! Mail : votre e-mail personnel et gratuit qui vous suit partout ! Créez votre Yahoo! Mail sur http://fr.benefits.yahoo.com/ Dialoguez en direct avec vos amis grâce à Yahoo! Messenger !Téléchargez Yahoo! Messenger sur http://fr.messenger.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
automatic LOG4J configuration reloading ?
Hi folks, Is there a way to do an automatic reloading of the log4j configuration declared as -Dlog4j.configuration ? = -- Regards, Ionel Yahoo! Mail : votre e-mail personnel et gratuit qui vous suit partout ! Créez votre Yahoo! Mail sur http://fr.benefits.yahoo.com/ Dialoguez en direct avec vos amis grâce à Yahoo! Messenger !Téléchargez Yahoo! Messenger sur http://fr.messenger.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
What is this exception ? (updated)
Hi list, Here is another strange exception printed directly on my console : === DEBUG MESSAGE: new exception propagation across deoptimization has not been tested yet Any ideas ? I'm still getting the FlushWriter exception too ... Thanks, Ionel Yahoo! Mail : votre e-mail personnel et gratuit qui vous suit partout ! Créez votre Yahoo! Mail sur http://fr.benefits.yahoo.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: What is this exception ?
no I did not do any of that. i have a question, nothing to do with log4j but I can't found an answer on the web. Considering a class A, with to methods : public synchronized void m1() public synchronized void m2() What appends if I call m2 from m1 ? m1() { m2(); } As I own the A instance, I should get no deadlock but I'd like an "experimeneted" developper to confirm ... thanks a lot folks, ionel Yahoo! Mail: votre e-mail personnel et gratuit qui vous suit partout ! Créez votre adresse à http://mail.yahoo.fr - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
What is this exception ?
Hi, I just get this error on my console : log4j:ERROR Failed to flush writer, java.io.InterruptedIOException at java.io.FileOutputStream.writeBytes(Native Method) at java.io.FileOutputStream.write(FileOutputStream.java:216) at java.io.OutputStreamWriter.flushBuffer(OutputStreamWriter.java:225) at java.io.OutputStreamWriter.flush(OutputStreamWriter.java:239) at org.apache.log4j.helpers.QuietWriter.flush(QuietWriter.java:49) at org.apache.log4j.WriterAppender.subAppend(WriterAppender.java:306) at org.apache.log4j.WriterAppender.append(WriterAppender.java:150) at org.apache.log4j.AppenderSkeleton.doAppend(AppenderSkeleton.java:221) at org.apache.log4j.helpers.AppenderAttachableImpl.appendLoopOnAppenders(AppenderAttachableImpl.java:57) at org.apache.log4j.Category.callAppenders(Category.java:187) at org.apache.log4j.Category.forcedLog(Category.java:372) at org.apache.log4j.Category.log(Category.java:864) at org.jboss.logging.Log4jLoggerPlugin.debug(Log4jLoggerPlugin.java:128) at org.jboss.logging.Logger.debug(Logger.java:142) at org.jboss.mq.il.oil.OILClientILService.run(OILClientILService.java:269) at java.lang.Thread.run(Thread.java:479) what does it means ? it is a temporary log4j failure or is it very serious ? thanks, ionel Yahoo! Mail: votre e-mail personnel et gratuit qui vous suit partout ! Créez votre adresse à http://mail.yahoo.fr - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: specifying properties from command line
Hi, I found the solution : -Dlog4j.configuration It works nd solves my problem : the properties file used is now mine, not the one of the third-party package. C u later, ionel _ Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français ! Yahoo! Mail : http://fr.mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
specifying properties from command line
Hi all, Is there a way to specify the property file to use at runtime ? (like by adding a -Dlog4j.something on the command line) Thanks, ionel _ Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français ! Yahoo! Mail : http://fr.mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: log4j.properties not read
Hi there, As I told, that what i've done. And I saw that the log4j.properties file used was not mine. Even by adding my file at the beginning of the classpath, it does not use it. I tried to add -Dlog4j.properties and -Dlog4j.properties.file but none worked. Is there a way to force the use of a certain properties file ? thanks, ionel _ Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français ! Yahoo! Mail : http://fr.mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ASYNC + SMTP appender with JBoss configuration
Hi Vladyslav, The line declares a buffer of 100 events to send with the message each time an error occurs. To reduce the amount of message received in the body of your mail, just decrease the buffersize value. hope this could help, ionel _ Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français ! Yahoo! Mail : http://fr.mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: log4j.properties not read
Christian, I used -dlog4j.debug=true in my command line and I saw that log4j is using another log4j.properties file (from a third-party jar file) Again, the first entry in my classpath is my own log4j.porperties file. Also I still have the -Dlog4j.properties= in the command line. Why don't it get to it ? I saw that the system define "-Dlog4j.proerties" is sometimes used "-Dlog4j.proerties.file". Which one is the correct sentence ? thanks, ionel _ Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français ! Yahoo! Mail : http://fr.mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
log4j.properties not read
Hi, I am running an application that uses log4j. I add the nedded log4j jars and the log4j.properties file on its classpath. Unfortunatly, I see none of the declared log files on my folders. I tries to add a -Dlog4j.properties= but it does not help : i am still missing the log files. How to force log4j to use a specific properties file ? If log4j does not complains about a missing properties file, it should have found it. If it has found it, it should have created the declared log files ... I am lost, any help appreciated, thanks, ionel _ Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français ! Yahoo! Mail : http://fr.mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: multiple logger to the same appender
Yes it is But I was not thinkning of a programmatically created logger. Say I have this : log4j.rootLogger=DEBUG, A1, mailer log4j.logger.aClass=DEBUG, A2, mailer log4j.appender.A1=org.apache.log4j.FileAppender log4j.appender.A1.file=TEProxy.log log4j.appender.A1.append=false log4j.appender.A1.layout=org.apache.log4j.PatternLayout log4j.appender.A1.layout.ConversionPattern=%d [%t] %-5p %c - %m%n log4j.appender.A2=org.apache.log4j.FileAppender log4j.appender.A2.file=PerfPublisher.log log4j.appender.A2.append=false log4j.appender.A2.layout=org.apache.log4j.PatternLayout log4j.appender.A2.layout.ConversionPattern=%d [%t] %-5p %c - %m%n log4j.appender.mailer=org.apache.log4j.net.SMTPAppender [EMAIL PROTECTED] [EMAIL PROTECTED] log4j.appender.mailer.subject=TEProxy log4j.appender.mailer.SMTPHost=smtp-gw log4j.appender.mailer.bufferSize=5 log4j.appender.mailer.layout=org.apache.log4j.PatternLayout log4j.appender.mailer.layout.ConversionPattern=%d [%t] %-5p %c - %m%n Is it correct ? the RootLogger and the aClass logger have their own FileAppender and they both refer to the mailer SMTPAppender (so they merge log message to the mailer appender) this is what I meant. ionel > I incurred in a similar doubt lately. Supose you are > configuring your > logger programmatically. So you can create an > appender, create a logger, > and set the appender to that logger. In the case > you are creating more > than one logger, it may be interesting (but I'm no > sure yet...) to reuse > the same appender, so that making changes in one > configuration, will > reflect on ALL the loggers that use it. > > Ionel, is this your case? _ Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français ! Yahoo! Mail : http://fr.mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
multiple logger to the same appender
Hi, Is it possible for many loggers to use the same appender ? I know a single logger can log to multiple appender but is the reverse true ? Another question : when setting additivity to false, what is the behavior when multiple appenders are declared for the logger ? Thanks, ionel _ Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français ! Yahoo! Mail : http://fr.mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: unknown problem with SMTPAppender
You got it Ken ! I was not aware of this limitation. BTW, is it possible to raise this limit in order to send WARN messages ? (not only ERROR or FATAL) (using threshold ?) thanks, ionel _ Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français ! Yahoo! Mail : http://fr.mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: unknown problem with SMTPAppender
Christian, It a miss-type. I try to use the machine name, then the IP and I even try appending the SMTP port. still no luck _ Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français ! Yahoo! Mail : http://fr.mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: unknown problem with SMTPAppender
Hi Raziel, I tried to use another SMTP server but I'm still getting no mails. sendmail's traffic is not logger so I looked at netstat to see if a connexion was established from my host. I see nothing ! Again, when connecting using telnet, I see the connection established and I can send mail by command line Are there any packages other than activation.jar ans mail.jar I need to get the SMTPAppender works ? Thanks, Ionel --- Raziel Steinmetz <[EMAIL PROTECTED]> a écrit : > ionel, > > I'm using the SMTPAppender and it is working very > well (on both windows and > Sun OS). if you don't get any exception from log4j > then I would go and check > your SMTP server log file to see if it got the email > to send, it could be > many reasons why you didn't got the email such as: > invalid email address, or > maybe the SMTP server queued your email for some > reason. > > SMTPAppender will send you an email as soon as it > gets a message with the > level that you defined (I think that the default > level is ERROR) the Buffer > size is the amount of prior messages that you will > see in the email - which > is great for troubleshooting, so I would recommend > to set it to much higher > then 1. > > Good luck, > Raz Steinmetz. > > -Original Message- > From: Ionel GARDAIS [mailto:[EMAIL PROTECTED] > Sent: Wednesday, January 21, 2004 5:59 AM > To: [EMAIL PROTECTED] > Subject: unknown problem with SMTPAppender > > > Hi, > > I am trying to use the SMTPAppender. > > It is configured like that : > > log4j.appender.mailer=org.apache.log4j.net.SMTPAppender > [EMAIL PROTECTED] > [EMAIL PROTECTED] > log4j.appender.mailer.subject=ProductPublisher > [EMAIL PROTECTED] > log4j.appender.mailer.bufferSize=1 > log4j.appender.mailer.layout=org.apache.log4j.PatternLayout > log4j.appender.mailer.layout.ConversionPattern=%d > [%t] > %-5p %c - %m%n > > > but I receive no mail. > The mail.jar and activation.jar are present (log4j > does not complain) > The smtp host is accessible (can send mail via > telnet > commands) > The mailer appender is declared for the rootLogger. > Turning log4j.debug=true does not help. > > I try to modify bufferSize to larger values but it > does not change a thing. > > What is wrong ? Does anybody succeed in using the > SMTPAppender ? > BTW, about the bufferSize, does the mail is only > sent > when the buffer is full or is it sent every time a > log > message arrive ? > > thanks > ionel > > _ > Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et > en français ! > Yahoo! Mail : http://fr.mail.yahoo.com > > - > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > _ Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français ! Yahoo! Mail : http://fr.mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
unknown problem with SMTPAppender
Hi, I am trying to use the SMTPAppender. It is configured like that : log4j.appender.mailer=org.apache.log4j.net.SMTPAppender [EMAIL PROTECTED] [EMAIL PROTECTED] log4j.appender.mailer.subject=ProductPublisher [EMAIL PROTECTED] log4j.appender.mailer.bufferSize=1 log4j.appender.mailer.layout=org.apache.log4j.PatternLayout log4j.appender.mailer.layout.ConversionPattern=%d [%t] %-5p %c - %m%n but I receive no mail. The mail.jar and activation.jar are present (log4j does not complain) The smtp host is accessible (can send mail via telnet commands) The mailer appender is declared for the rootLogger. Turning log4j.debug=true does not help. I try to modify bufferSize to larger values but it does not change a thing. What is wrong ? Does anybody succeed in using the SMTPAppender ? BTW, about the bufferSize, does the mail is only sent when the buffer is full or is it sent every time a log message arrive ? thanks ionel _ Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français ! Yahoo! Mail : http://fr.mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Using logger declared in an abstract superclass
Hi, I have the following problem : say I have two classes : abstract class A { Logger log = Logger.getLogger(this.getClass(); } class B extends A { log.debug("foo"); } class C extends A { log.debug("bar"); } I declared the RootLogger as a file logger to a file named "main.log" When I look at the main.log file, I have the log from both B and C, with both information about the class which made the log. Now, if I declare another logger, especialy for the B class, I can see B's log messages in both the root logger and its dedicated logger. C's log appears only in the main logger (as expected) Problem is : for the B class, why does the root logger gets the message too ? Is it a side-effect because I declare the logger in an abstract superclass and I declared the custom logger upon the B class ? Is there a way to tell "if I have a dedicated logger for a class, use it but do not log to the root logger ?" thanks, ionel _ Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français ! Yahoo! Mail : http://fr.mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]