logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From arthikbabu <karthik.b...@wipro.com>
Subject Help log4j SysLogAppender
Date Mon, 19 Nov 2007 12:45:31 GMT


I am not able to write the log messages in the syslog server (particularly I
need to write in the messages log file)  and Pls find the code below and I
dont know wht missed out

package com.test.syslog;

import org.apache.log4j.Logger;
import org.apache.log4j.PropertyConfigurator;

public class TestSyslog {

static Logger log = Logger.getLogger("TestSyslog");

public static void main(String args[]) {
log.debug("This is my debug message.");
log.info("This is my info message.");
log.warn("This is my warn message.");
log.error("This is my error message.");
log.fatal("This is my fatal message.");

config file

log4j.rootLogger=INFO, A1
log4j.appender.A1.layout.ConversionPattern=%-4r %-5p %c{2} %M.%L %x - %m\n

Thanks in advance
View this message in context: http://www.nabble.com/Help-log4j-SysLogAppender-tf4836091.html#a13835417
Sent from the Log4j - Users mailing list archive at Nabble.com.

To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org

View raw message