Getting Runtime configuration

2002-12-17 Thread Kohinoor Lal Verma (EHS)
I am using PropertyConfigurator. Is there a way (a method) by which I can get all the runtime properties of the configured log4j ?? Thanks in advance. Kohinoor - Kohinoor Lal Verma, Senior Systems Engineer, Ericsson Mobile Commerce Platform, New Delhi, Ind

display only n number of LEFTMOST components in category name?

2002-12-17 Thread Jason Rizer
Hello, I'm new to log4j. I'm using the Pattern Layout. It's possible to suppress the left most components in the logger name with eg) %c{2}. I'm wondering if there is some undocumented way to suppress the right most. I suspect there isn't but figured it couldn't hurt to ask. Thanks in advance

display only n number of LEFTMOST components in category name?

2002-12-17 Thread Jason Rizer
Hello, I'm new to log4j. I'm using the Pattern Layout. It's possible to suppress the left most components in the logger name with eg) %c{2}. I'm wondering if there is some undocumented way to suppress the right most. I suspect there isn't but figured it couldn't hurt to ask. Thanks in advance

How to prepend a line to the beginning of a log file after each rollover?

2002-12-17 Thread Bradley . Liu
Log4j gurus, I am new to the list. I did a quick search in mail archive, and did not find any discussion on a similar topic. What I want to do is to prepend the log format at the beginning of the log file each time the log is rolled over with org.apache.log4j.RollingFileAppender. This format

Newbie question

2002-12-17 Thread Hu
Hi, I would like to log the information in case of server exception, and later some application can read the information back and do some process. what is the proper way to do it? Thanks. __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sig

Multiple log4j JMS appenders with Weblogic 7

2002-12-17 Thread Clive Beavis
I cannot get two log4j JMS appenders to append to a single Weblogic JMS Topic if one of the log4j appenders is running on the weblogic server that is also supporting the JMS topic. The second server (not the one supporting the JMS Topic) will always fail with "connection not found" . Simple modif

Re: design question

2002-12-17 Thread Daniel . Hannum
I don't know how much this helps you, but at our company, we just specified a bunch of new fields through the MDC. When an application starts, it goes MDC.set("ProductId", "widget"); And then in your layout, you include "%X{ProductId}" and the Product ID will be printed out. This means you onl

design question

2002-12-17 Thread Amy Cheung
I need to subclass log4j to meet the logging standard defined by our company. The requirements include specifying a ProductId in every log file. The root element in the DTD looks like this: New classes I defined include MyLoggerFactory, MyLogger, and MyLayout etc. To make this ProductId a config

RE: send mail frmo Log4J using SMTP

2002-12-17 Thread Cicero, Marlon
Here's a snippet from my code to send E-mails: // create email appender SMTPAppender smtpAppender = new SMTPAppender(); smtpAppender.setTo(emailTo); smtpAppender.setFrom(emailFrom); smtpAppender.setSMTPHost(emailHost); smtpAppender.setSubject(emailSubject); smtpAppender.setLocationInfo(false); smt

send mail frmo Log4J using SMTP

2002-12-17 Thread Reddy, Suresh
hi, I am having problems sending email from Log4j. can anyone help me regarding this? SMTPAppender smtpApp = new SMTPAppender(); smtpApp.setFrom("[EMAIL PROTECTED]"); smtpApp.setTo("[EMAIL PROTECTED]"); smtpApp.setSMTPHost("mail.something.com"); smtpApp.setLoca

RE: syslog not logging linefeeds

2002-12-17 Thread Cicero, Marlon
No, that did not work. The PatternLayout's %n is for the format of the String passed to it. Since it "\n" gets properly translated when sent to the Console and not the Syslog, I suspect it might be how the Syslog routine writes the String. Dec 17 12:25:48 localhost [DEBUG] [Log4JTest] - debug:%n

RE: syslog not logging linefeeds

2002-12-17 Thread Colin MacDonald
> -Original Message- > > I'm using "\n" in my Strings, but instead of a linefeed in the syslog, it > actually shows a "\n". Any ideas? Try "%n". It's the "platform dependent line separator character", according to the PatternLayout javadocs. -

syslog not logging linefeeds

2002-12-17 Thread Cicero, Marlon
I'm using "\n" in my Strings, but instead of a linefeed in the syslog, it actually shows a "\n". Any ideas? I noticed that the exception hierarchy is separated by newlines in the syslog so there should be a way to do it. I'm using log4j 1.2.7 and JDK 1.4.1_01 on Solaris 2.7. Thanks! Console