Results 1 to 3 of 3
  1. #1
    log4jlog4j is offline Member
    Join Date
    Mar 2011
    Posts
    2
    Rep Power
    0

    Post Log4j debug for only one method in application

    Hi,
    Just want to check can we set debug for any specific method in the applciation using log4j. This will be very useful if we have this feature in log4j so trying to check on this.

    I have a application running on production and to check on one very complicated issue want to check if we can set debug for any specific method. Due to volume and performance we dont want to do debug at applciation level on production and we are not able to reproduce that on our test environment.

  2. #2
    lovelesh is offline Senior Member
    Join Date
    Nov 2010
    Location
    Delhi
    Posts
    135
    Blog Entries
    1
    Rep Power
    0

    Smile

    Use can use Filter( provided by Log4j) for this purpose.

    Alternatively, you can extend logger class and provide you own logging apis. From these logging apis you will have to call logger class' methods. You can check here whether to log or not.

  3. #3
    log4jlog4j is offline Member
    Join Date
    Mar 2011
    Posts
    2
    Rep Power
    0

Similar Threads

  1. setup log4j in servlet application
    By javastuden in forum Java Servlet
    Replies: 0
    Last Post: 08-06-2010, 12:28 PM
  2. Log4j Grouping application logs
    By mhanda in forum New To Java
    Replies: 0
    Last Post: 03-09-2010, 12:19 AM
  3. Debug challenge: how do you debug a Java program?
    By CJSLMAN in forum New To Java
    Replies: 60
    Last Post: 07-04-2009, 10:28 AM
  4. Debug JAR files used in an external application
    By ragnarahk in forum Eclipse
    Replies: 0
    Last Post: 09-22-2008, 05:36 PM
  5. log4j property file in my application
    By Peter in forum Advanced Java
    Replies: 3
    Last Post: 06-14-2007, 03:12 AM

Tags for this Thread

Posting Permissions

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