I must be doing something stupid here:
C:\tmp\log>java -jar logorrhea.jar -Dlog4j.configurationFile=c:/tmp/log/mblog4j.properties
ERROR StatusLogger No log4j2 configuration file found. Using default configuration: logging only errors to the console.
I'm following the directions in https://logging.apache.org/log4j/2.x/manual/configuration.html to set the log4j.configurationFile
system property but it doesn't seem to work. (and there is a file called c:/tmp/log/mblog4j.properties
present)
What could be going wrong?
My mblog4j.properties file looks like this:
# Setup loggers: default threshold = ERROR, but special stuff = INFO
log4j.rootLogger=ERROR,FILE
log4j.logger.com.example.mypackage=INFO,FILE
log4j.appender.FILE=org.apache.log4j.FileAppender
log4j.appender.FILE.File=c:/tmp/log/mb4j.log
log4j.appender.FILE.ImmediateFlush=true
# Set the append to false, overwrite
log4j.appender.FILE.Append=false
log4j.appender.FILE.layout=org.apache.log4j.PatternLayout
log4j.appender.FILE.layout.ConversionPattern= %-4r [%t] %-5p %c %x - %m%n