Write errors to different log file w/ log4j?

Discussions

General J2EE: Write errors to different log file w/ log4j?

  1. Write errors to different log file w/ log4j? (3 messages)

    Hi all,

    I have another log4j question. I want to have ERROR log messages written to a separate file. How can I do this?

    -- Joe
  2. Hello

    I think u can use filters if u use log4j.xml.

    -sriram
  3. Could you explain that a little more? I am not sure what you mean by that.
  4. well each appender has a threshold value..which u can set.
    U can refer
    http://logging.apache.org/log4j/docs/api/org/apache/log4j/AppenderSkeleton.html

    also u can use filters to filter the messages.

    -ram