1.

How Will You Configure A Dailyrollingfileappender Using Log4j.properties?

Answer»

Following CODE CONFIGURES a DailyRollingFileAppender −

# Define the ROOT LOGGER with appender file
log4j.rootLogger = DEBUG, FILE 
# Define the file appender
log4j.appender.FILE = org.apache.log4j.DailyRollingFileAppender

Following code configures a DailyRollingFileAppender −

# Define the root logger with appender file
log4j.rootLogger = DEBUG, FILE 
# Define the file appender
log4j.appender.FILE = org.apache.log4j.DailyRollingFileAppender



Discussion

No Comment Found