Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 3 of 3

Thread: Issue with log4j.properties file

  1. #1
    Junior Member
    Join Date
    May 2013
    Posts
    5
    My Mood
    Sleepy
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Issue with log4j.properties file

    I am trying to generating log file in server location getting error, while accessing below log4j.properties file.

    # Log levels
    log4j.rootLogger=INFO,CONSOLE,R
    # Appender Configuration
    log4j.appender.CONSOLE=org.apache.log4j.ConsoleApp ender
    # Pattern to output the caller's file name and line number
    log4j.appender.CONSOLE.layout=org.apache.log4j.Pat ternLayout
    log4j.appender.CONSOLE.layout.ConversionPattern=%5 p [%t] (%F:%L) - %m%n
    # Rolling File Appender
    log4j.appender.R=org.apache.log4j.RollingFileAppen der
    # Path and file name to store the log file
    log4j.appender.R.File=/global/apl_log.log
    log4j.appender.R.MaxFileSize=200KB
    # Number of backup files
    log4j.appender.R.MaxBackupIndex=2
    # Layout for Rolling File Appender
    log4j.appender.R.layout=org.apache.log4j.PatternLa yout
    log4j.appender.R.layout.ConversionPattern=%d - %c - %p - %m%n


  2. #2
    Senior Member PhHein's Avatar
    Join Date
    Mar 2013
    Location
    Germany
    Posts
    609
    My Mood
    Sleepy
    Thanks
    10
    Thanked 93 Times in 86 Posts

    Default Re: Issue with log4j.properties file

    What error do you get?

  3. #3
    Member andbin's Avatar
    Join Date
    Dec 2013
    Location
    Italy
    Posts
    443
    Thanks
    4
    Thanked 122 Times in 114 Posts

    Default Re: Issue with log4j.properties file

    Quote Originally Posted by raghu3.ankam View Post
    I am trying to generating log file in server location getting error, while accessing below log4j.properties file.
    The file seems correct.
    Andrea, www.andbin.netSCJP 5 (91%) – SCWCD 5 (94%)

    Useful links for Java beginnersMy new project Java Examples on Google Code

Similar Threads

  1. Jar file can not understand properties file!
    By nguyendu0102 in forum What's Wrong With My Code?
    Replies: 0
    Last Post: December 6th, 2012, 10:07 PM
  2. Logging excel file using log4j.properties
    By sneha343 in forum Java Theory & Questions
    Replies: 1
    Last Post: December 6th, 2011, 10:03 AM
  3. Structured Properties File?
    By moka in forum Java Theory & Questions
    Replies: 7
    Last Post: October 19th, 2010, 11:14 AM
  4. Accessing Properties File
    By java_mein in forum Java Servlet
    Replies: 5
    Last Post: May 14th, 2010, 02:44 AM
  5. Glassfish + log4j + multiple log4j.xml
    By arttaras in forum Web Frameworks
    Replies: 0
    Last Post: January 14th, 2010, 01:24 AM

Tags for this Thread