Hi all,
I'm in the process of migrating MCF to log4j 2, but I am having a lot of
trouble getting it to work at all. This is where things stand:
(1) I had to change the name of our logging file from logging.ini to
logging.properties, because otherwise it attempts to interpret it as XML;
(2) The format of the file has now changed; new properties are needed. I
tried to find examples of these online but failed to find any working
example. Based on the documentation for log4j2, I worked up a guess at
what a simple logging.properties file would look like:
>>>>>>
status=info
name=ManifoldCF
property.filename = logs/manifoldcf.log
appender.file.type = File
appender.file.name = file
appender.file.fileName = logs/manifoldcf.log
appender.file.layout.type = PatternLayout
appender.file.pattern = %5p %d{ISO8601} (%t) - %m%n
rootLogger.level = warn
rootLogger.appenderRef.file.ref = file
<<<<<<
This, however, doesn't work; particularly, it fails to even create the log
file, although I have lock debugging turned on and we should be seeing a
lot of DEBUG logging events.
There's a manual, of sorts, but it doesn't really even cover the
PropertiesConfigurator, I guess since it wasn't introduced until version
2.4. I've tried to roughly emulate the sample XML configurations in
properties but no luck. Does anyone have a resource that they can point me
to here?
Thanks!!
Karl