@@ -27,67 +27,59 @@ public class LegacyPropertiesCompatibilityTest {
27
27
28
28
public static Object [][] data () {
29
29
return new Object [][]{
30
- {"log4j2.configurationFile" , "log4j.configurationFile" },
31
- {"log4j2.mergeStrategy" , "log4j.mergeStrategy" },
32
- {"log4j2.contextSelector" , "Log4jContextSelector" },
33
- {"log4j2.logEventFactory" , "Log4jLogEventFactory" },
34
- {"log4j2.configurationFactory" , "log4j.configurationFactory" },
35
- {"log4j2.shutdownCallbackRegistry" , "log4j.shutdownCallbackRegistry" },
36
- {"log4j2.clock" , "log4j.Clock" },
37
- {"log4j2.level" , "org.apache.logging.log4j.level" },
38
- {"log4j2.disableThreadContext" , "disableThreadContext" },
39
- {"log4j2.disableThreadContextStack" , "disableThreadContextStack" },
40
- {"log4j2.disableThreadContextMap" , "disableThreadContextMap" },
41
- {"log4j2.isThreadContextMapInheritable" , "isThreadContextMapInheritable" },
42
- {"log4j2.contextDataInjector" , "log4j2.ContextDataInjector" },
43
- {"log4j2.garbagefreeThreadContextMap" , "log4j2.garbagefree.threadContextMap" },
44
- {"log4j2.disableJmx" , "log4j2.disable.jmx" },
45
- {"log4j2.jmxNotifyAsync" , "log4j2.jmx.notify.async" },
46
- {"log4j2.skipJansi" , "log4j.skipJansi" },
47
- {"log4j2.ignoreTCL" , "log4j.ignoreTCL" },
48
- {"log4j2.ignoreTCL" , "LOG4J_IGNORE_TCL" }, // just a sanity check for fun camel case names
49
- {"log4j2.uuidSequence" , "org.apache.logging.log4j.uuidSequence" },
50
- {"log4j2.assignedSequences" , "org.apache.logging.log4j.assignedSequences" },
51
- {"log4j2.simplelogShowContextMap" , "org.apache.logging.log4j.simplelog.showContextMap" },
52
- {"log4j2.simplelogShowlogname" , "org.apache.logging.log4j.simplelog.showlogname" },
53
- {"log4j2.simplelogShowShortLogname" , "org.apache.logging.log4j.simplelog.showShortLogname" },
54
- {"log4j2.simplelogShowdatetime" , "org.apache.logging.log4j.simplelog.showdatetime" },
55
- {"log4j2.simplelogDateTimeFormat" , "org.apache.logging.log4j.simplelog.dateTimeFormat" },
56
- {"log4j2.simplelogLogFile" , "org.apache.logging.log4j.simplelog.logFile" },
57
- {"log4j2.simplelogLevel" , "org.apache.logging.log4j.simplelog.level" },
58
- {"log4j2.simplelog.com.foo.bar.Thing.level" , "org.apache.logging.log4j.simplelog.com.foo.bar.Thing.level" },
59
- {"log4j2.simplelogComFooBarThingLevel" , "org.apache.logging.log4j.simplelog.com.foo.bar.Thing.level" },
60
- {"log4j2.simplelogStatusLoggerLevel" , "org.apache.logging.log4j.simplelog.StatusLogger.level" },
61
- {"log4j2.defaultStatusLevel" , "Log4jDefaultStatusLevel" },
62
- {"log4j2.statusLoggerLevel" , "log4j2.StatusLogger.level" },
63
- {"log4j2.statusEntries" , "log4j2.status.entries" },
64
- {"log4j2.asyncLoggerExceptionHandler" , "AsyncLogger.ExceptionHandler" },
65
- {"log4j2.asyncLoggerRingBufferSize" , "AsyncLogger.RingBufferSize" },
66
- {"log4j2.asyncLoggerWaitStrategy" , "AsyncLogger.WaitStrategy" },
67
- {"log4j2.asyncLoggerThreadNameStrategy" , "AsyncLogger.ThreadNameStrategy" },
68
- {"log4j2.asyncLoggerConfigExceptionHandler" , "AsyncLoggerConfig.ExceptionHandler" },
69
- {"log4j2.asyncLoggerConfigRingBufferSize" , "AsyncLoggerConfig.RingBufferSize" },
70
- {"log4j2.asyncLoggerConfigWaitStrategy" , "AsyncLoggerConfig.WaitStrategy" },
71
- {"log4j2.julLoggerAdapter" , "log4j.jul.LoggerAdapter" },
72
- {"log4j2.formatMsgAsync" , "log4j.format.msg.async" },
73
- {"log4j2.asyncQueueFullPolicy" , "log4j2.AsyncQueueFullPolicy" },
74
- {"log4j2.discardThreshold" , "log4j2.DiscardThreshold" },
75
- {"log4j2.isWebapp" , "log4j2.is.webapp" },
76
- {"log4j2.enableThreadlocals" , "log4j2.enable.threadlocals" },
77
- {"log4j2.enableDirectEncoders" , "log4j2.enable.direct.encoders" },
78
- {"log4j2.initialReusableMsgSize" , "log4j.initialReusableMsgSize" },
79
- {"log4j2.maxReusableMsgSize" , "log4j.maxReusableMsgSize" },
80
- {"log4j2.layoutStringBuilderMaxSize" , "log4j.layoutStringBuilder.maxSize" },
81
- {"log4j2.unboxRingbufferSize" , "log4j.unbox.ringbuffer.size" },
82
- {"log4j2.loggerContextStacktraceOnStart" , "log4j.LoggerContext.stacktrace.on.start" },
30
+ {"log4j2.configurationFile" , "Configuration.file" },
31
+ {"log4j2.mergeStrategy" , "Configuration.mergeStrategy" },
32
+ {"log4j2.contextSelector" , "LoggerContext.selector" },
33
+ {"log4j2.logEventFactory" , "Logger.logEventFactory" },
34
+ {"log4j2.configurationFactory" , "Configuration.factory" },
35
+ {"log4j2.shutdownCallbackRegistry" , "LoggerContext.shutdownCallbackRegistry" },
36
+ {"log4j2.clock" , "Configuration.clock" },
37
+ {"log4j2.level" , "Configuration.level" },
38
+ {"log4j2.isThreadContextMapInheritable" , "ThreadContext.inheritable" },
39
+ {"log4j2.contextDataInjector" , "ThreadContext.contextDataInjector" },
40
+ {"log4j2.garbagefreeThreadContextMap" , "ThreadContext.garbageFreeMap" },
41
+ {"log4j2.jmxNotifyAsync" , "JMX.notifyAsync" },
42
+ {"log4j2.ignoreTCL" , "Loader.ignoreTCL" },
43
+ {"log4j2.uuidSequence" , "UUID.sequence" },
44
+ {"log4j2.assignedSequences" , "UUID.assignedSequences" },
45
+ {"log4j2.simplelogShowContextMap" , "SimpleLogger.showContextMap" },
46
+ {"log4j2.simplelogShowlogname" , "SimpleLogger.showLogName" },
47
+ {"log4j2.simplelogShowShortLogname" , "SimpleLogger.showShortLogName" },
48
+ {"log4j2.simplelogShowdatetime" , "SimpleLogger.showDateTime" },
49
+ {"log4j2.simplelogDateTimeFormat" , "SimpleLogger.dateTimeFormat" },
50
+ {"log4j2.simplelogLogFile" , "SimpleLogger.logFile" },
51
+ {"log4j2.simplelogLevel" , "SimpleLogger.level" },
52
+ {"log4j2.simplelogStatusLoggerLevel" , "SimpleLogger.statusLoggerLevel" },
53
+ {"log4j2.defaultStatusLevel" , "StatusLogger.defaultLevel" },
54
+ {"log4j2.statusLoggerLevel" , "StatusLogger.level" },
55
+ {"log4j2.statusEntries" , "StatusLogger.entries" },
56
+ {"log4j2.asyncLoggerExceptionHandler" , "AsyncLogger.exceptionHandler" },
57
+ {"log4j2.asyncLoggerRingBufferSize" , "AsyncLogger.ringBufferSize" },
58
+ {"log4j2.asyncLoggerWaitStrategy" , "AsyncLogger.waitStrategy" },
59
+ {"log4j2.asyncLoggerThreadNameStrategy" , "AsyncLogger.threadNameStrategy" },
60
+ {"log4j2.asyncLoggerConfigExceptionHandler" , "AsyncLoggerConfig.exceptionHandler" },
61
+ {"log4j2.asyncLoggerConfigRingBufferSize" , "AsyncLoggerConfig.ringBufferSize" },
62
+ {"log4j2.asyncLoggerConfigWaitStrategy" , "AsyncLoggerConfig.waitStrategy" },
63
+ {"log4j2.julLoggerAdapter" , "JUL.loggerAdapter" },
64
+ {"log4j2.formatMsgAsync" , "AsyncLogger.formatMsg" },
65
+ {"log4j2.asyncQueueFullPolicy" , "AsyncLogger.queueFullPolicy" },
66
+ {"log4j2.discardThreshold" , "AsyncLogger.discardThreshold" },
67
+ {"log4j2.isWebapp" , "Web.isWebApp" },
68
+ {"log4j2.enableThreadlocals" , "ThreadLocals.enable" },
69
+ {"log4j2.enableDirectEncoders" , "GC.enableDirectEncoders" },
70
+ {"log4j2.initialReusableMsgSize" , "GC.initialReusableMsgSize" },
71
+ {"log4j2.maxReusableMsgSize" , "GC.maxReusableMsgSize" },
72
+ {"log4j2.layoutStringBuilderMaxSize" , "GC.layoutStringBuilderMaxSize" },
73
+ {"log4j2.unboxRingbufferSize" , "Unbox.ringBufferSize" },
74
+ {"log4j2.loggerContextStacktraceOnStart" , "LoggerContext.stackTraceOnStart" }
83
75
};
84
76
}
85
77
86
78
@ ParameterizedTest
87
79
@ MethodSource ("data" )
88
- public void compareNewWithOldName (final String newName , final String oldName ) {
80
+ public void compareNewWithOldName (final String oldName , final String newName ) {
89
81
final List <CharSequence > newTokens = PropertySource .Util .tokenize (newName );
90
82
final List <CharSequence > oldTokens = PropertySource .Util .tokenize (oldName );
91
- assertEquals (oldTokens , newTokens );
83
+ assertEquals (newTokens , oldTokens );
92
84
}
93
85
}
0 commit comments