Results 1 to 1 of 1
  1. #1
    arthik_babu is offline Member
    Join Date
    Nov 2007
    Rep Power

    Question Help log4j SysLogAppender


    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.");"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 der
    log4j.appender.A1.layout=org.apache.log4j.PatternL ayout
    log4j.appender.A1.layout.ConversionPattern=%-4r %-5p %c{2} %M.%L %x - %m\n

    Thanks in advance
    Last edited by arthik_babu; 11-19-2007 at 03:06 PM.

Similar Threads

  1. log4j
    By swapna_d in forum New To Java
    Replies: 7
    Last Post: 08-04-2010, 01:23 AM
  2. Regarding Log4j
    By sidiq in forum New To Java
    Replies: 0
    Last Post: 04-07-2008, 08:35 PM
  3. log4j with Applet
    By sunjavaboy in forum Java Applets
    Replies: 0
    Last Post: 03-25-2008, 01:13 AM
  4. Log4j
    By chakri in forum New To Java
    Replies: 1
    Last Post: 02-08-2008, 11:15 PM
  5. Problems using log4j
    By fred in forum Advanced Java
    Replies: 1
    Last Post: 08-06-2007, 04:30 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts