Home > Uncategorized > How to create excessive log for JSF

How to create excessive log for JSF

I was in need of creating excessive log to learn JSF. Here is the steps to do that.

1. Create log4j.properties file

log4j.rootLogger=debug, stdout
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout log4j.appender.stdout.layout.ConversionPattern=%p %t %c %m%n

2. Place “log4j-1.2.8.jar” file under WEB-INF/lib folder

3. Restart the application, Boom!!! you are done.

Advertisements
Categories: Uncategorized
  1. mohanmca
    September 6, 2007 at 5:08 am

    Below properties can also be used – if require to log everything in file.

    log4j.rootLogger=DEBUG, stdout, R

    log4j.appender.R=org.apache.log4j.RollingFileAppender
    log4j.appender.R.File=${catalina.home}/logs/jsf.log
    log4j.appender.R.MaxFileSize=10MB
    log4j.appender.R.MaxBackupIndex=10
    log4j.appender.R.layout=org.apache.log4j.PatternLayout
    log4j.appender.R.layout.ConversionPattern=%p %t %c – %m%n

    log4j.appender.stdout=org.apache.log4j.ConsoleAppender
    log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
    log4j.appender.stdout.layout.ConversionPattern=%p %t %c – %m%n

  2. February 29, 2008 at 4:07 am

    Is this for myFaces or Sun JSF?

  3. mohanmca
    July 15, 2008 at 2:45 am

    I dont remember using SunJSF, so I hope it was using myFaces.

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: