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
-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.
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] -
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);
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.
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
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,