Results 1 to 2 of 2
  1. #1
    vadali is offline Member
    Join Date
    Feb 2009
    Posts
    2
    Rep Power
    0

    Default log4j - Different Pattern for levels, configuration in XML

    Hello,

    I am very new to log4j, and i need to find a way to make a different logging pattern for different levels (obviously, debug has to be much more detailed..). I looked around, and found this htt?://wiki.apache.org/logging-log4j/UsefulCode (under "Setting The Conversion Pattern Layout Differently Per Logging Level"). (* why cant i put a url if i have no 20 posts?! :confused::confused:)

    Do we really have to patch up our code in order to do such an trivial task? and anyhow, i dont think this code would work with XML configuration (which is a given in my case..).

    What else can I do?

    I tried making another logger, besides my root logger, but then I get messages printed twice..
    Thanks for your help,
    vadali

  2. #2
    vadali is offline Member
    Join Date
    Feb 2009
    Posts
    2
    Rep Power
    0

    Default

    Well, my bad.. The link i found was indeed the solution, and it worked perfectly with xml!
    thanks!

Similar Threads

  1. Java Berlin - all levels!!!!
    By Javarecruiter in forum Jobs Offered
    Replies: 25
    Last Post: 08-14-2009, 02:42 PM
  2. svn and configuration files
    By caffeine in forum New To Java
    Replies: 1
    Last Post: 08-21-2008, 05:14 AM
  3. save configuration
    By Peter in forum XML
    Replies: 2
    Last Post: 07-04-2007, 08:40 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
  •