My log4jproperties:
log4j.appender.file=org.apache.log4j.RollingFileAppender
log4j.appender.file.maxFileSize=100KB
log4j.appender.file.maxBackupIndex=5
log4j.appender.file.File=checkLog.log
log4j.appender.file.threshold=DEBUG
log4j.appender.file.layout=org.apache.log4j.PatternLayout
log4j.appender.file.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n
log4j.appender.console=org.apache.log4j.ConsoleAppender log4j.appender.console.layout=org.apache.log4j.PatternLayout
log4j.appender.console.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n
I wanna to print log4j to console and to file but when I import slf4j-log12-1.6.4.jar it prints just in file and it throws this exception:
Could not instantiate class [org.apache.log4j.ConsoleAppender log4j.appender.console.layout=org.apache.log4j.PatternLayout].
when I import slf4jsimple-1.6.4.jar it print just to console with no exception
so what I should import ?
And what I should change in properties to print stacktrace. I am using this:
logger.error("ERROR!: " + e);
but I only see:
16:59:28,703 ERROR PlayOffPanel:275 - ERROR!: java.lang.IndexOutOfBoundsException:
Index: 15, Size: 15