Skip to content
This repository has been archived by the owner on Sep 1, 2022. It is now read-only.

Support for log4j 2.5 ? #438

Open
puntogil opened this issue Feb 22, 2016 · 4 comments
Open

Support for log4j 2.5 ? #438

puntogil opened this issue Feb 22, 2016 · 4 comments

Comments

@puntogil
Copy link

puntogil commented Feb 22, 2016

hi
any plans for add log4j 2.5 support?
i wrote a little patch for try to solve the problem in the tdcommon sub module

---- ./tdcommon/src/main/java/thredds/util/LoggerFactorySpecial.java    2015-06-10 00:05:23.000000000 +0200
++++ ./tdcommon/src/main/java/thredds/util/LoggerFactorySpecial.java    2016-02-22 01:28:58.868652563 +0100
+@@ -150,6 +150,7 @@
`
+       Configuration config = new NullConfiguration(); // LOOK: Why are we using this? Why not DefaultConfiguration?
+       PatternLayout layout = PatternLayout.createLayout(
+               "%d{yyyy-MM-dd'T'HH:mm:ss.SSS Z} %-5p - %m%n",  // String pattern
++              null,                                           // PatternSelector patternSelector
+               config,                                         // Configuration config
+               null,                                           // RegexReplacement replace
+               null,                                           // Charset charset
+@@ -171,8 +172,10 @@
+               DefaultRolloverStrategy.createStrategy(                           // RolloverStrategy strategy
+                       Integer.toString(maxBackups),   // String max
+                       "1",                            // String min
+                       "max",                          // String fileIndex
+                       null,                           // String compressionLevelStr
++                      null,                           // Action[] customActions
++                      true,                           // boolean stopCustomActionsOnError
+                       config                          // Configuration config
+               ),
+               layout,                                                           // Layout<? extends Serializable> layout

thanks in advance
regards

@JohnLCaron
Copy link
Collaborator

shouldnt be a problem upgrading to 2.5 (currently on 2.4.1) in 5.0.

do you fixes assume 2.5?

@puntogil
Copy link
Author

yes, thanks

@puntogil
Copy link
Author

is off-topic, but is possible also upgrade quartz to 2.2.1 ?
org.quartz-scheduler:quartz:2.2.0 org.quartz-scheduler.internal:quartz-core:2.2.1

@JohnLCaron
Copy link
Collaborator

LoggerFactorySpecial is used to assign seperate log files to each collection. Needed because you dont know what the collections are until you read in the config files.

Its a bit of a hack, there are better ways to do it that I never had time to learn. I think in 5.0, Im not using seperate log files anymore, so Im not sure if this is still used. Would be good to get rid of it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants