Log4 j issue- Merging with other logger content

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • nagk9
    New Member
    • Jun 2008
    • 1

    Log4 j issue- Merging with other logger content

    Hi ,

    I am using log4j in my application. I have the problem with log4j.propertie s file . It will automatically appends another logger file from the current logger which i am using for the current application and also it logs or merging other logger content of other applications in the current logger. I don't want to print other logger messages from the current logger. Is there any way to restrict the other logger messages of other applications from the current logger file. And this logger (log4j.properti es) file i am setting at server level. Is there any way to set the logger file based on application wise.? Pls find the log4j.propertie s file below and anybody let me know the solution for this problem asap.

    log4j.propertie s


    # ***** R is set to be a RollingFileAppe nder.
    log4j.rootLogge r=INFO,R
    log4j.appender. R= org.apache.log4 j.Fileappender
    log4j.appender. R=org.apache.lo g4j.RollingFile Appender
    log4j.appender. R.File=/apps/opt/chcl.log
    # ***** Max file size is set to 100KB
    log4j.appender. R.MaxFileSize=1 00KB
    # ***** Keep one backup file
    log4j.appender. R.MaxBackupInde x=3
    # ***** R uses PatternLayout.
    log4j.appender. R.layout=org.ap ache.log4j.Patt ernLayout
    log4j.appender. R.layout.Conver sionPattern=%p %t %c - %m%n
  • Dököll
    Recognized Expert Top Contributor
    • Nov 2006
    • 2379

    #2
    Hey there!

    How do you have your classes set up? You may need to create different classes for each object in your program, perhaps this might help you allocate proper area for certeain logger mesages, independent or otherwise free from unintentionally merging together with other logger messages. Would be able to add the whole code for all to see? Perhaps seeing it may help tackle this one good...

    Sorry for your troubles, in a bit!
    Last edited by Dököll; Jul 12 '08, 01:10 AM. Reason: able for a ble...

    Comment

    Working...