[logback-dev] svn commit: r1921 - in logback/trunk: logback-access/src/main/java/ch/qos/logback/access/boolex logback-access/src/main/java/ch/qos/logback/access/jetty logback-access/src/main/java/ch/qos/logback/access/pattern logback-access/src/main/java/ch/qos/logback/access/tomcat logback-classic/src/main/java/ch/qos/logback/classic logback-classic/src/main/java/ch/qos/logback/classic/boolex logback-classic/src/main/java/ch/qos/logback/classic/pattern logback-classic/src/main/java/ch/qos/logback/classic/spi logback-classic/src/main/java/org/slf4j/impl logback-classic/src/test/java/ch/qos/logback/classic/html logback-classic/src/test/java/ch/qos/logback/classic/joran logback-classic/src/test/java/ch/qos/logback/classic/net logback-classic/src/test/java/ch/qos/logback/classic/net/testObjectBuilders logback-classic/src/test/java/ch/qos/logback/classic/pattern logback-core/src/main/java/ch/qos/logback/core logback-core/src/main/java/ch/qos/logback/core/helpers logback-core/src/main/ java/ch/qos/logback/core/html logback-core/src/main/java/ch/qos/logback/core/joran/action logback-core/src/main/java/ch/qos/logback/core/joran/spi logback-core/src/main/java/ch/qos/logback/core/net logback-core/src/main/java/ch/qos/logback/core/pattern logback-core/src/main/java/ch/qos/logback/core/pattern/parser logback-core/src/main/java/ch/qos/logback/core/pattern/util logback-core/src/main/java/ch/qos/logback/core/util
noreply.ceki at qos.ch
noreply.ceki at qos.ch
Thu Oct 30 21:41:13 CET 2008
Author: ceki
Date: Thu Oct 30 21:41:13 2008
New Revision: 1921
Added:
logback/trunk/logback-core/src/main/java/ch/qos/logback/core/CoreConstants.java
Removed:
logback/trunk/logback-classic/src/test/java/ch/qos/logback/classic/net/testObjectBuilders/MinimalExtBuilder.java
logback/trunk/logback-core/src/main/java/ch/qos/logback/core/CoreGlobal.java
Modified:
logback/trunk/logback-access/src/main/java/ch/qos/logback/access/boolex/JaninoEventEvaluator.java
logback/trunk/logback-access/src/main/java/ch/qos/logback/access/jetty/RequestLogImpl.java
logback/trunk/logback-access/src/main/java/ch/qos/logback/access/pattern/DateConverter.java
logback/trunk/logback-access/src/main/java/ch/qos/logback/access/pattern/LineSeparatorConverter.java
logback/trunk/logback-access/src/main/java/ch/qos/logback/access/tomcat/LogbackValve.java
logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/LoggerContext.java
logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/PatternLayout.java
logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/boolex/JaninoEventEvaluator.java
logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/pattern/CallerDataConverter.java
logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/pattern/DateConverter.java
logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/pattern/LineSeparatorConverter.java
logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/pattern/NopThrowableInformationConverter.java
logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/pattern/ThrowableProxyConverter.java
logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/spi/CallerData.java
logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/spi/ThrowableProxy.java
logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/spi/ThrowableToDataPointArray.java
logback/trunk/logback-classic/src/main/java/org/slf4j/impl/StaticLoggerBinder.java
logback/trunk/logback-classic/src/test/java/ch/qos/logback/classic/html/HTMLLayoutTest.java
logback/trunk/logback-classic/src/test/java/ch/qos/logback/classic/joran/EvaluatorJoranTest.java
logback/trunk/logback-classic/src/test/java/ch/qos/logback/classic/net/SMTPAppender_GreenTest.java
logback/trunk/logback-classic/src/test/java/ch/qos/logback/classic/net/SMTPAppender_SubethaSMTPTest.java
logback/trunk/logback-classic/src/test/java/ch/qos/logback/classic/net/SerializationPerfsTest.java
logback/trunk/logback-classic/src/test/java/ch/qos/logback/classic/net/testObjectBuilders/Builder.java
logback/trunk/logback-classic/src/test/java/ch/qos/logback/classic/pattern/ConverterTest.java
logback/trunk/logback-core/src/main/java/ch/qos/logback/core/helpers/ThrowableToStringArray.java
logback/trunk/logback-core/src/main/java/ch/qos/logback/core/html/HTMLLayoutBase.java
logback/trunk/logback-core/src/main/java/ch/qos/logback/core/joran/action/AbstractEventEvaluatorAction.java
logback/trunk/logback-core/src/main/java/ch/qos/logback/core/joran/action/AppenderRefAction.java
logback/trunk/logback-core/src/main/java/ch/qos/logback/core/joran/action/ConversionRuleAction.java
logback/trunk/logback-core/src/main/java/ch/qos/logback/core/joran/spi/PropertySetter.java
logback/trunk/logback-core/src/main/java/ch/qos/logback/core/net/SyslogAppenderBase.java
logback/trunk/logback-core/src/main/java/ch/qos/logback/core/pattern/PatternLayoutBase.java
logback/trunk/logback-core/src/main/java/ch/qos/logback/core/pattern/parser/TokenStream.java
logback/trunk/logback-core/src/main/java/ch/qos/logback/core/pattern/util/AlmostAsIsEscapeUtil.java
logback/trunk/logback-core/src/main/java/ch/qos/logback/core/util/OptionHelper.java
logback/trunk/logback-core/src/main/java/ch/qos/logback/core/util/StatusPrinter.java
Log:
- rename CoreGlogal as CoreConstants
Modified: logback/trunk/logback-access/src/main/java/ch/qos/logback/access/boolex/JaninoEventEvaluator.java
==============================================================================
--- logback/trunk/logback-access/src/main/java/ch/qos/logback/access/boolex/JaninoEventEvaluator.java (original)
+++ logback/trunk/logback-access/src/main/java/ch/qos/logback/access/boolex/JaninoEventEvaluator.java Thu Oct 30 21:41:13 2008
@@ -4,7 +4,7 @@
import java.util.List;
import ch.qos.logback.access.spi.AccessEvent;
-import ch.qos.logback.core.CoreGlobal;
+import ch.qos.logback.core.CoreConstants;
import ch.qos.logback.core.boolex.JaninoEventEvaluatorBase;
import ch.qos.logback.core.boolex.Matcher;
@@ -39,7 +39,7 @@
fullNameList.add(m.getName());
}
- return (String[]) fullNameList.toArray(CoreGlobal.EMPTY_STRING_ARRAY);
+ return (String[]) fullNameList.toArray(CoreConstants.EMPTY_STRING_ARRAY);
}
protected Class[] getParameterTypes() {
@@ -48,7 +48,7 @@
for(int i = 0; i < matcherList.size(); i++) {
fullTypeList.add(Matcher.class);
}
- return (Class[]) fullTypeList.toArray(CoreGlobal.EMPTY_CLASS_ARRAY);
+ return (Class[]) fullTypeList.toArray(CoreConstants.EMPTY_CLASS_ARRAY);
}
protected Object[] getParameterValues(Object event) {
Modified: logback/trunk/logback-access/src/main/java/ch/qos/logback/access/jetty/RequestLogImpl.java
==============================================================================
--- logback/trunk/logback-access/src/main/java/ch/qos/logback/access/jetty/RequestLogImpl.java (original)
+++ logback/trunk/logback-access/src/main/java/ch/qos/logback/access/jetty/RequestLogImpl.java Thu Oct 30 21:41:13 2008
@@ -12,7 +12,7 @@
import ch.qos.logback.access.spi.AccessEvent;
import ch.qos.logback.core.Appender;
import ch.qos.logback.core.ContextBase;
-import ch.qos.logback.core.CoreGlobal;
+import ch.qos.logback.core.CoreConstants;
import ch.qos.logback.core.filter.Filter;
import ch.qos.logback.core.joran.spi.JoranException;
import ch.qos.logback.core.spi.AppenderAttachable;
@@ -120,7 +120,7 @@
boolean started = false;
public RequestLogImpl() {
- putObject(CoreGlobal.EVALUATOR_MAP, new HashMap());
+ putObject(CoreConstants.EVALUATOR_MAP, new HashMap());
}
public void log(Request jettyRequest, Response jettyResponse) {
Modified: logback/trunk/logback-access/src/main/java/ch/qos/logback/access/pattern/DateConverter.java
==============================================================================
--- logback/trunk/logback-access/src/main/java/ch/qos/logback/access/pattern/DateConverter.java (original)
+++ logback/trunk/logback-access/src/main/java/ch/qos/logback/access/pattern/DateConverter.java Thu Oct 30 21:41:13 2008
@@ -15,7 +15,7 @@
import java.util.TimeZone;
import ch.qos.logback.access.spi.AccessEvent;
-import ch.qos.logback.core.CoreGlobal;
+import ch.qos.logback.core.CoreConstants;
@@ -29,11 +29,11 @@
String datePattern = getFirstOption();
if(datePattern == null) {
- datePattern = CoreGlobal.CLF_DATE_PATTERN;
+ datePattern = CoreConstants.CLF_DATE_PATTERN;
}
- if (datePattern.equals(CoreGlobal.ISO8601_STR)) {
- datePattern = CoreGlobal.ISO8601_PATTERN;
+ if (datePattern.equals(CoreConstants.ISO8601_STR)) {
+ datePattern = CoreConstants.ISO8601_PATTERN;
}
try {
@@ -43,7 +43,7 @@
addWarn(
"Could not instantiate SimpleDateFormat with pattern " + datePattern, e);
// default to the ISO8601 format
- simpleFormat = new SimpleDateFormat(CoreGlobal.CLF_DATE_PATTERN);
+ simpleFormat = new SimpleDateFormat(CoreConstants.CLF_DATE_PATTERN);
}
List optionList = getOptionList();
Modified: logback/trunk/logback-access/src/main/java/ch/qos/logback/access/pattern/LineSeparatorConverter.java
==============================================================================
--- logback/trunk/logback-access/src/main/java/ch/qos/logback/access/pattern/LineSeparatorConverter.java (original)
+++ logback/trunk/logback-access/src/main/java/ch/qos/logback/access/pattern/LineSeparatorConverter.java Thu Oct 30 21:41:13 2008
@@ -1,12 +1,12 @@
package ch.qos.logback.access.pattern;
import ch.qos.logback.access.spi.AccessEvent;
-import ch.qos.logback.core.CoreGlobal;
+import ch.qos.logback.core.CoreConstants;
public class LineSeparatorConverter extends AccessConverter {
public String convert(AccessEvent event) {
- return CoreGlobal.LINE_SEPARATOR;
+ return CoreConstants.LINE_SEPARATOR;
}
}
Modified: logback/trunk/logback-access/src/main/java/ch/qos/logback/access/tomcat/LogbackValve.java
==============================================================================
--- logback/trunk/logback-access/src/main/java/ch/qos/logback/access/tomcat/LogbackValve.java (original)
+++ logback/trunk/logback-access/src/main/java/ch/qos/logback/access/tomcat/LogbackValve.java Thu Oct 30 21:41:13 2008
@@ -19,7 +19,7 @@
import ch.qos.logback.core.Appender;
import ch.qos.logback.core.BasicStatusManager;
import ch.qos.logback.core.Context;
-import ch.qos.logback.core.CoreGlobal;
+import ch.qos.logback.core.CoreConstants;
import ch.qos.logback.core.filter.Filter;
import ch.qos.logback.core.joran.spi.JoranException;
import ch.qos.logback.core.spi.AppenderAttachable;
@@ -74,7 +74,7 @@
boolean started;
public LogbackValve() {
- putObject(CoreGlobal.EVALUATOR_MAP, new HashMap());
+ putObject(CoreConstants.EVALUATOR_MAP, new HashMap());
}
public void start() {
Modified: logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/LoggerContext.java
==============================================================================
--- logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/LoggerContext.java (original)
+++ logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/LoggerContext.java Thu Oct 30 21:41:13 2008
@@ -27,7 +27,7 @@
import ch.qos.logback.classic.spi.TurboFilterAttachableImpl;
import ch.qos.logback.classic.turbo.TurboFilter;
import ch.qos.logback.core.ContextBase;
-import ch.qos.logback.core.CoreGlobal;
+import ch.qos.logback.core.CoreConstants;
import ch.qos.logback.core.spi.FilterReply;
import ch.qos.logback.core.spi.LifeCycle;
import ch.qos.logback.core.status.ErrorStatus;
@@ -72,7 +72,7 @@
this.root = new Logger(ROOT_NAME, null, this);
this.root.setLevel(Level.DEBUG);
loggerCache.put(ROOT_NAME, root);
- putObject(CoreGlobal.EVALUATOR_MAP, new HashMap());
+ putObject(CoreConstants.EVALUATOR_MAP, new HashMap());
size = 1;
}
Modified: logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/PatternLayout.java
==============================================================================
--- logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/PatternLayout.java (original)
+++ logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/PatternLayout.java Thu Oct 30 21:41:13 2008
@@ -31,7 +31,7 @@
import ch.qos.logback.classic.pattern.ThreadConverter;
import ch.qos.logback.classic.pattern.ThrowableProxyConverter;
import ch.qos.logback.classic.spi.LoggingEvent;
-import ch.qos.logback.core.CoreGlobal;
+import ch.qos.logback.core.CoreConstants;
import ch.qos.logback.core.pattern.PatternLayoutBase;
/**
@@ -124,7 +124,7 @@
public String doLayout(LoggingEvent event) {
if (!isStarted()) {
- return CoreGlobal.EMPTY_STRING;
+ return CoreConstants.EMPTY_STRING;
}
return writeLoopOnConverters(event);
}
Modified: logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/boolex/JaninoEventEvaluator.java
==============================================================================
--- logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/boolex/JaninoEventEvaluator.java (original)
+++ logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/boolex/JaninoEventEvaluator.java Thu Oct 30 21:41:13 2008
@@ -9,7 +9,7 @@
import ch.qos.logback.classic.Level;
import ch.qos.logback.classic.spi.LoggerRemoteView;
import ch.qos.logback.classic.spi.LoggingEvent;
-import ch.qos.logback.core.CoreGlobal;
+import ch.qos.logback.core.CoreConstants;
import ch.qos.logback.core.boolex.JaninoEventEvaluatorBase;
import ch.qos.logback.core.boolex.Matcher;
@@ -71,7 +71,7 @@
fullNameList.add(m.getName());
}
- return (String[]) fullNameList.toArray(CoreGlobal.EMPTY_STRING_ARRAY);
+ return (String[]) fullNameList.toArray(CoreConstants.EMPTY_STRING_ARRAY);
}
protected Class[] getParameterTypes() {
@@ -80,7 +80,7 @@
for(int i = 0; i < matcherList.size(); i++) {
fullTypeList.add(Matcher.class);
}
- return (Class[]) fullTypeList.toArray(CoreGlobal.EMPTY_CLASS_ARRAY);
+ return (Class[]) fullTypeList.toArray(CoreConstants.EMPTY_CLASS_ARRAY);
}
protected Object[] getParameterValues(Object event) {
Modified: logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/pattern/CallerDataConverter.java
==============================================================================
--- logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/pattern/CallerDataConverter.java (original)
+++ logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/pattern/CallerDataConverter.java Thu Oct 30 21:41:13 2008
@@ -16,7 +16,7 @@
import ch.qos.logback.classic.spi.CallerData;
import ch.qos.logback.classic.spi.LoggingEvent;
import ch.qos.logback.core.Context;
-import ch.qos.logback.core.CoreGlobal;
+import ch.qos.logback.core.CoreConstants;
import ch.qos.logback.core.boolex.EvaluationException;
import ch.qos.logback.core.boolex.EventEvaluator;
import ch.qos.logback.core.status.ErrorStatus;
@@ -55,7 +55,7 @@
String evaluatorStr = (String) optionList.get(i);
Context context = getContext();
if (context != null) {
- Map evaluatorMap = (Map) context.getObject(CoreGlobal.EVALUATOR_MAP);
+ Map evaluatorMap = (Map) context.getObject(CoreConstants.EVALUATOR_MAP);
EventEvaluator ee = (EventEvaluator) evaluatorMap.get(evaluatorStr);
if (ee != null) {
addEvaluator(ee);
@@ -103,7 +103,7 @@
}
if (!printCallerData) {
- return CoreGlobal.EMPTY_STRING;
+ return CoreConstants.EMPTY_STRING;
}
}
@@ -116,7 +116,7 @@
buf.append(i);
buf.append("\t at ");
buf.append(cda[i]);
- buf.append(CoreGlobal.LINE_SEPARATOR);
+ buf.append(CoreConstants.LINE_SEPARATOR);
}
return buf.toString();
} else {
Modified: logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/pattern/DateConverter.java
==============================================================================
--- logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/pattern/DateConverter.java (original)
+++ logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/pattern/DateConverter.java Thu Oct 30 21:41:13 2008
@@ -15,7 +15,7 @@
import java.util.TimeZone;
import ch.qos.logback.classic.spi.LoggingEvent;
-import ch.qos.logback.core.CoreGlobal;
+import ch.qos.logback.core.CoreConstants;
public class DateConverter extends ClassicConverter {
@@ -28,11 +28,11 @@
String datePattern = getFirstOption();
if(datePattern == null) {
- datePattern = CoreGlobal.ISO8601_PATTERN;
+ datePattern = CoreConstants.ISO8601_PATTERN;
}
- if (datePattern.equals(CoreGlobal.ISO8601_STR)) {
- datePattern = CoreGlobal.ISO8601_PATTERN;
+ if (datePattern.equals(CoreConstants.ISO8601_STR)) {
+ datePattern = CoreConstants.ISO8601_PATTERN;
}
try {
@@ -41,7 +41,7 @@
} catch (IllegalArgumentException e) {
addWarn("Could not instantiate SimpleDateFormat with pattern " + datePattern, e);
// default to the ISO8601 format
- simpleFormat = new SimpleDateFormat(CoreGlobal.ISO8601_PATTERN);
+ simpleFormat = new SimpleDateFormat(CoreConstants.ISO8601_PATTERN);
}
List optionList = getOptionList();
Modified: logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/pattern/LineSeparatorConverter.java
==============================================================================
--- logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/pattern/LineSeparatorConverter.java (original)
+++ logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/pattern/LineSeparatorConverter.java Thu Oct 30 21:41:13 2008
@@ -1,12 +1,12 @@
package ch.qos.logback.classic.pattern;
import ch.qos.logback.classic.spi.LoggingEvent;
-import ch.qos.logback.core.CoreGlobal;
+import ch.qos.logback.core.CoreConstants;
public class LineSeparatorConverter extends ClassicConverter {
public String convert(LoggingEvent event) {
- return CoreGlobal.LINE_SEPARATOR;
+ return CoreConstants.LINE_SEPARATOR;
}
}
Modified: logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/pattern/NopThrowableInformationConverter.java
==============================================================================
--- logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/pattern/NopThrowableInformationConverter.java (original)
+++ logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/pattern/NopThrowableInformationConverter.java Thu Oct 30 21:41:13 2008
@@ -2,7 +2,7 @@
import ch.qos.logback.classic.PatternLayout;
import ch.qos.logback.classic.spi.LoggingEvent;
-import ch.qos.logback.core.CoreGlobal;
+import ch.qos.logback.core.CoreConstants;
@@ -24,7 +24,7 @@
public class NopThrowableInformationConverter extends ThrowableHandlingConverter {
public String convert(LoggingEvent event) {
- return CoreGlobal.EMPTY_STRING;
+ return CoreConstants.EMPTY_STRING;
}
}
Modified: logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/pattern/ThrowableProxyConverter.java
==============================================================================
--- logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/pattern/ThrowableProxyConverter.java (original)
+++ logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/pattern/ThrowableProxyConverter.java Thu Oct 30 21:41:13 2008
@@ -17,7 +17,7 @@
import ch.qos.logback.classic.spi.ThrowableDataPoint;
import ch.qos.logback.classic.spi.ThrowableProxy;
import ch.qos.logback.core.Context;
-import ch.qos.logback.core.CoreGlobal;
+import ch.qos.logback.core.CoreConstants;
import ch.qos.logback.core.boolex.EvaluationException;
import ch.qos.logback.core.boolex.EventEvaluator;
import ch.qos.logback.core.status.ErrorStatus;
@@ -65,7 +65,7 @@
for (int i = 1; i < optionListSize; i++) {
String evaluatorStr = (String) optionList.get(i);
Context context = getContext();
- Map evaluatorMap = (Map) context.getObject(CoreGlobal.EVALUATOR_MAP);
+ Map evaluatorMap = (Map) context.getObject(CoreConstants.EVALUATOR_MAP);
EventEvaluator ee = (EventEvaluator) evaluatorMap.get(evaluatorStr);
addEvaluator(ee);
}
@@ -99,7 +99,7 @@
ThrowableProxy information = event.getThrowableProxy();
if (information == null) {
- return CoreGlobal.EMPTY_STRING;
+ return CoreConstants.EMPTY_STRING;
}
ThrowableDataPoint[] tdpArray = information.getThrowableDataPointArray();
@@ -134,18 +134,18 @@
}
if (!printStack) {
- return CoreGlobal.EMPTY_STRING;
+ return CoreConstants.EMPTY_STRING;
}
}
prepareLoggingEvent(event);
- buf.append(tdpArray[0]).append(CoreGlobal.LINE_SEPARATOR);
+ buf.append(tdpArray[0]).append(CoreConstants.LINE_SEPARATOR);
for (int i = 1; i < length; i++) {
String string = tdpArray[i].toString();
buf.append(string);
extraData(buf, tdpArray[i]); // allow other data to be appended
- buf.append(CoreGlobal.LINE_SEPARATOR);
+ buf.append(CoreConstants.LINE_SEPARATOR);
}
return buf.toString();
Modified: logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/spi/CallerData.java
==============================================================================
--- logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/spi/CallerData.java (original)
+++ logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/spi/CallerData.java Thu Oct 30 21:41:13 2008
@@ -9,7 +9,7 @@
*/
package ch.qos.logback.classic.spi;
-import ch.qos.logback.core.CoreGlobal;
+import ch.qos.logback.core.CoreConstants;
/**
* The internal representation of caller location information.
@@ -36,7 +36,7 @@
public static final int LINE_NA = -1;
- public static String CALLER_DATA_NA = "?#?:?"+CoreGlobal.LINE_SEPARATOR;
+ public static String CALLER_DATA_NA = "?#?:?"+CoreConstants.LINE_SEPARATOR;
/**
* This value is returned in case no caller data could be extracted.
Modified: logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/spi/ThrowableProxy.java
==============================================================================
--- logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/spi/ThrowableProxy.java (original)
+++ logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/spi/ThrowableProxy.java Thu Oct 30 21:41:13 2008
@@ -11,7 +11,7 @@
import java.util.Arrays;
-import ch.qos.logback.core.CoreGlobal;
+import ch.qos.logback.core.CoreConstants;
public class ThrowableProxy implements java.io.Serializable {
@@ -86,7 +86,7 @@
String string = tdp.toString();
builder.append(string);
extraData(builder, tdp);
- builder.append(CoreGlobal.LINE_SEPARATOR);
+ builder.append(CoreConstants.LINE_SEPARATOR);
}
System.out.println(builder.toString());
}
Modified: logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/spi/ThrowableToDataPointArray.java
==============================================================================
--- logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/spi/ThrowableToDataPointArray.java (original)
+++ logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/spi/ThrowableToDataPointArray.java Thu Oct 30 21:41:13 2008
@@ -13,7 +13,7 @@
import java.util.LinkedList;
import java.util.List;
-import ch.qos.logback.core.CoreGlobal;
+import ch.qos.logback.core.CoreConstants;
/**
* Convert a throwable into an array of ThrowableDataPoint objects.
@@ -57,7 +57,7 @@
StackTraceElement[] parentSTE) {
String prefix = "";
if (parentSTE != null) {
- prefix = CoreGlobal.CAUSED_BY;
+ prefix = CoreConstants.CAUSED_BY;
}
String result = prefix + t.getClass().getName();
Modified: logback/trunk/logback-classic/src/main/java/org/slf4j/impl/StaticLoggerBinder.java
==============================================================================
--- logback/trunk/logback-classic/src/main/java/org/slf4j/impl/StaticLoggerBinder.java (original)
+++ logback/trunk/logback-classic/src/main/java/org/slf4j/impl/StaticLoggerBinder.java Thu Oct 30 21:41:13 2008
@@ -23,7 +23,7 @@
import ch.qos.logback.classic.selector.ContextSelector;
import ch.qos.logback.classic.selector.DefaultContextSelector;
import ch.qos.logback.classic.util.ContextInitializer;
-import ch.qos.logback.core.CoreGlobal;
+import ch.qos.logback.core.CoreConstants;
import ch.qos.logback.core.joran.spi.JoranException;
import ch.qos.logback.core.util.Loader;
import ch.qos.logback.core.util.OptionHelper;
@@ -40,7 +40,7 @@
private ContextSelector contextSelector;
- final static String NULL_CS_URL = CoreGlobal.CODES_URL + "#null_CS";
+ final static String NULL_CS_URL = CoreConstants.CODES_URL + "#null_CS";
/**
* The unique instance of this class.
Modified: logback/trunk/logback-classic/src/test/java/ch/qos/logback/classic/html/HTMLLayoutTest.java
==============================================================================
--- logback/trunk/logback-classic/src/test/java/ch/qos/logback/classic/html/HTMLLayoutTest.java (original)
+++ logback/trunk/logback-classic/src/test/java/ch/qos/logback/classic/html/HTMLLayoutTest.java Thu Oct 30 21:41:13 2008
@@ -23,7 +23,7 @@
import ch.qos.logback.classic.spi.LoggingEvent;
import ch.qos.logback.classic.spi.ThrowableDataPoint;
import ch.qos.logback.classic.spi.ThrowableProxy;
-import ch.qos.logback.core.CoreGlobal;
+import ch.qos.logback.core.CoreConstants;
import ch.qos.logback.core.read.ListAppender;
public class HTMLLayoutTest {
@@ -177,7 +177,7 @@
assertTrue(header.startsWith("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">"));
sb.append(header);
sb.append(layout.getPresentationHeader());
- for(int i = 0; i < CoreGlobal.TABLE_ROW_LIMIT*3; i++) {
+ for(int i = 0; i < CoreConstants.TABLE_ROW_LIMIT*3; i++) {
sb.append(layout.doLayout( new LoggingEvent(this.getClass().getName(), logger,
Level.DEBUG, "test message"+i, null, null)));
}
Modified: logback/trunk/logback-classic/src/test/java/ch/qos/logback/classic/joran/EvaluatorJoranTest.java
==============================================================================
--- logback/trunk/logback-classic/src/test/java/ch/qos/logback/classic/joran/EvaluatorJoranTest.java (original)
+++ logback/trunk/logback-classic/src/test/java/ch/qos/logback/classic/joran/EvaluatorJoranTest.java Thu Oct 30 21:41:13 2008
@@ -22,7 +22,7 @@
import ch.qos.logback.classic.boolex.JaninoEventEvaluator;
import ch.qos.logback.classic.spi.LoggingEvent;
import ch.qos.logback.classic.util.TeztConstants;
-import ch.qos.logback.core.CoreGlobal;
+import ch.qos.logback.core.CoreConstants;
import ch.qos.logback.core.boolex.EvaluationException;
import ch.qos.logback.core.joran.spi.JoranException;
@@ -36,7 +36,7 @@
jc.doConfigure(TeztConstants.TEST_DIR_PREFIX + "input/joran/simpleEvaluator.xml");
- Map evalMap = (Map) loggerContext.getObject(CoreGlobal.EVALUATOR_MAP);
+ Map evalMap = (Map) loggerContext.getObject(CoreConstants.EVALUATOR_MAP);
assertNotNull(evalMap);
//StatusPrinter.print(loggerContext.getStatusManager());
JaninoEventEvaluator evaluator = (JaninoEventEvaluator) evalMap.get("msgEval");
@@ -58,7 +58,7 @@
//StatusPrinter.print(loggerContext.getStatusManager());
- Map evalMap = (Map) loggerContext.getObject(CoreGlobal.EVALUATOR_MAP);
+ Map evalMap = (Map) loggerContext.getObject(CoreConstants.EVALUATOR_MAP);
assertNotNull(evalMap);
//StatusPrinter.print(loggerContext.getStatusManager());
Modified: logback/trunk/logback-classic/src/test/java/ch/qos/logback/classic/net/SMTPAppender_GreenTest.java
==============================================================================
--- logback/trunk/logback-classic/src/test/java/ch/qos/logback/classic/net/SMTPAppender_GreenTest.java (original)
+++ logback/trunk/logback-classic/src/test/java/ch/qos/logback/classic/net/SMTPAppender_GreenTest.java Thu Oct 30 21:41:13 2008
@@ -20,7 +20,7 @@
import ch.qos.logback.classic.html.HTMLLayout;
import ch.qos.logback.classic.html.XHTMLEntityResolver;
import ch.qos.logback.classic.spi.LoggingEvent;
-import ch.qos.logback.core.CoreGlobal;
+import ch.qos.logback.core.CoreConstants;
import ch.qos.logback.core.Layout;
import com.icegreen.greenmail.util.GreenMail;
@@ -141,7 +141,7 @@
smtpAppender.start();
Logger logger = lc.getLogger("test");
logger.addAppender(smtpAppender);
- for (int i = 0; i < CoreGlobal.TABLE_ROW_LIMIT * 3; i++) {
+ for (int i = 0; i < CoreConstants.TABLE_ROW_LIMIT * 3; i++) {
logger.debug("hello " + i);
}
logger.error("en error", new Exception("an exception"));
Modified: logback/trunk/logback-classic/src/test/java/ch/qos/logback/classic/net/SMTPAppender_SubethaSMTPTest.java
==============================================================================
--- logback/trunk/logback-classic/src/test/java/ch/qos/logback/classic/net/SMTPAppender_SubethaSMTPTest.java (original)
+++ logback/trunk/logback-classic/src/test/java/ch/qos/logback/classic/net/SMTPAppender_SubethaSMTPTest.java Thu Oct 30 21:41:13 2008
@@ -34,7 +34,7 @@
import ch.qos.logback.classic.html.HTMLLayout;
import ch.qos.logback.classic.html.XHTMLEntityResolver;
import ch.qos.logback.classic.spi.LoggingEvent;
-import ch.qos.logback.core.CoreGlobal;
+import ch.qos.logback.core.CoreConstants;
import ch.qos.logback.core.Layout;
import ch.qos.logback.core.util.StatusPrinter;
@@ -175,7 +175,7 @@
smtpAppender.start();
Logger logger = lc.getLogger("test");
logger.addAppender(smtpAppender);
- for (int i = 0; i < CoreGlobal.TABLE_ROW_LIMIT * 3; i++) {
+ for (int i = 0; i < CoreConstants.TABLE_ROW_LIMIT * 3; i++) {
logger.debug("hello " + i);
}
logger.error("en error", new Exception("an exception"));
Modified: logback/trunk/logback-classic/src/test/java/ch/qos/logback/classic/net/SerializationPerfsTest.java
==============================================================================
--- logback/trunk/logback-classic/src/test/java/ch/qos/logback/classic/net/SerializationPerfsTest.java (original)
+++ logback/trunk/logback-classic/src/test/java/ch/qos/logback/classic/net/SerializationPerfsTest.java Thu Oct 30 21:41:13 2008
@@ -21,13 +21,13 @@
/**
* <p>
* Run the test with a MockSocketServer or with a NOPOutputStream
- * </p>
+ *
* <p>
* Run with external mock can be done using the ExternalMockSocketServer. It
* needs to be launched from a separate JVM. The ExternalMockSocketServer does
* not consume the events but passes through the available bytes that it is
- * recieving.
- * </p>
+ * receiving.
+ *
* <p>
* For example, with 4 test methods, you can launch the
* ExternalMockSocketServer this way:
Modified: logback/trunk/logback-classic/src/test/java/ch/qos/logback/classic/net/testObjectBuilders/Builder.java
==============================================================================
--- logback/trunk/logback-classic/src/test/java/ch/qos/logback/classic/net/testObjectBuilders/Builder.java (original)
+++ logback/trunk/logback-classic/src/test/java/ch/qos/logback/classic/net/testObjectBuilders/Builder.java Thu Oct 30 21:41:13 2008
@@ -1,10 +1,20 @@
+/**
+ * Logback: the generic, reliable, fast and flexible logging framework.
+ *
+ * Copyright (C) 2000-2008, QOS.ch
+ *
+ * This library is free software, you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation.
+ */
package ch.qos.logback.classic.net.testObjectBuilders;
public interface Builder {
- //45 characters message
- final String MSG_PREFIX = "aaaaabbbbbcccccdddddaaaaabbbbbcccccdddddaaaa";
- //final String MSG_PREFIX = "a";
-
- Object build(int i);
+ // 45 characters message
+ final String MSG_PREFIX = "aaaaabbbbbcccccdddddaaaaabbbbbcccccdddddaaaa";
+
+ // final String MSG_PREFIX = "a";
+
+ Object build(int i);
}
Modified: logback/trunk/logback-classic/src/test/java/ch/qos/logback/classic/pattern/ConverterTest.java
==============================================================================
--- logback/trunk/logback-classic/src/test/java/ch/qos/logback/classic/pattern/ConverterTest.java (original)
+++ logback/trunk/logback-classic/src/test/java/ch/qos/logback/classic/pattern/ConverterTest.java Thu Oct 30 21:41:13 2008
@@ -22,7 +22,7 @@
import ch.qos.logback.classic.LoggerContext;
import ch.qos.logback.classic.TestConstants;
import ch.qos.logback.classic.spi.LoggingEvent;
-import ch.qos.logback.core.CoreGlobal;
+import ch.qos.logback.core.CoreConstants;
import ch.qos.logback.core.net.SyslogConstants;
import ch.qos.logback.core.pattern.DynamicConverter;
import ch.qos.logback.core.pattern.FormatInfo;
@@ -113,7 +113,7 @@
DynamicConverter<LoggingEvent> converter = new LineSeparatorConverter();
StringBuffer buf = new StringBuffer();
converter.write(buf, le);
- assertEquals(CoreGlobal.LINE_SEPARATOR, buf.toString());
+ assertEquals(CoreConstants.LINE_SEPARATOR, buf.toString());
}
public void testException() {
Added: logback/trunk/logback-core/src/main/java/ch/qos/logback/core/CoreConstants.java
==============================================================================
--- (empty file)
+++ logback/trunk/logback-core/src/main/java/ch/qos/logback/core/CoreConstants.java Thu Oct 30 21:41:13 2008
@@ -0,0 +1,67 @@
+package ch.qos.logback.core;
+
+public class CoreConstants {
+
+ // Note that the line.separator property can be looked up even by
+ // applets.
+ public static final String LINE_SEPARATOR = System.getProperty("line.separator");
+ public static final int LINE_SEPARATOR_LEN = LINE_SEPARATOR.length();
+
+
+ public static final String CODES_URL = "http://logback.qos.ch/codes.html";
+
+ /**
+ * Customized pattern conversion rules are stored under this key in the
+ * {@link Context} object store.
+ */
+ public static final String PATTERN_RULE_REGISTRY = "PATTERN_RULE_REGISTRY";
+
+ public static final String ISO8601_STR = "ISO8601";
+ public static final String ISO8601_PATTERN = "yyyy-MM-dd HH:mm:ss,SSS";
+
+ /**
+ * Time format used in Common Log Format
+ */
+ static public final String CLF_DATE_PATTERN = "dd/MM/yyyy:HH:mm:ss Z";
+
+ /**
+ * The key used in locating the evaluator map in context's object map.
+ */
+ static public final String EVALUATOR_MAP = "EVALUATOR_MAP";
+
+ /**
+ * By convention, we assume that the static method named "valueOf" taking
+ * a string argument can restore a given object from its string
+ * representation.
+ *
+ * <p>Classes participating in this convention must be declared
+ * as stringStorable in a (logback) context.
+ */
+ static public final String VALUE_OF = "valueOf";
+
+ /**
+ * An empty string.
+ */
+ public final static String EMPTY_STRING = "";
+
+ /**
+ * An empty string array.
+ */
+ public final static String[] EMPTY_STRING_ARRAY = new String[] {};
+
+ /**
+ * An empty Class array.
+ */
+ public final static Class[] EMPTY_CLASS_ARRAY = new Class[] {};
+ public final static String CAUSED_BY = "Caused by: ";
+
+
+ public final static char PERCENT_CHAR = '%';
+
+ /**
+ * Number of rows before in an HTML table before,
+ * we close the table and create a new one
+ */
+ public static final int TABLE_ROW_LIMIT = 10000;
+
+}
Modified: logback/trunk/logback-core/src/main/java/ch/qos/logback/core/helpers/ThrowableToStringArray.java
==============================================================================
--- logback/trunk/logback-core/src/main/java/ch/qos/logback/core/helpers/ThrowableToStringArray.java (original)
+++ logback/trunk/logback-core/src/main/java/ch/qos/logback/core/helpers/ThrowableToStringArray.java Thu Oct 30 21:41:13 2008
@@ -12,7 +12,7 @@
import java.util.LinkedList;
import java.util.List;
-import ch.qos.logback.core.CoreGlobal;
+import ch.qos.logback.core.CoreConstants;
public class ThrowableToStringArray {
@@ -48,7 +48,7 @@
StackTraceElement[] parentSTE) {
String prefix = "";
if (parentSTE != null) {
- prefix = CoreGlobal.CAUSED_BY;
+ prefix = CoreConstants.CAUSED_BY;
}
String result = prefix + t.getClass().getName();
Modified: logback/trunk/logback-core/src/main/java/ch/qos/logback/core/html/HTMLLayoutBase.java
==============================================================================
--- logback/trunk/logback-core/src/main/java/ch/qos/logback/core/html/HTMLLayoutBase.java (original)
+++ logback/trunk/logback-core/src/main/java/ch/qos/logback/core/html/HTMLLayoutBase.java Thu Oct 30 21:41:13 2008
@@ -2,7 +2,7 @@
import java.util.Map;
-import ch.qos.logback.core.CoreGlobal;
+import ch.qos.logback.core.CoreConstants;
import ch.qos.logback.core.LayoutBase;
import ch.qos.logback.core.pattern.Converter;
import ch.qos.logback.core.pattern.ConverterUtil;
@@ -204,7 +204,7 @@
}
protected void startNewTableIfLimitReached(StringBuilder sbuf) {
- if (this.counter >= CoreGlobal.TABLE_ROW_LIMIT) {
+ if (this.counter >= CoreConstants.TABLE_ROW_LIMIT) {
counter = 0;
sbuf.append("</table>");
sbuf.append(LINE_SEP);
Modified: logback/trunk/logback-core/src/main/java/ch/qos/logback/core/joran/action/AbstractEventEvaluatorAction.java
==============================================================================
--- logback/trunk/logback-core/src/main/java/ch/qos/logback/core/joran/action/AbstractEventEvaluatorAction.java (original)
+++ logback/trunk/logback-core/src/main/java/ch/qos/logback/core/joran/action/AbstractEventEvaluatorAction.java Thu Oct 30 21:41:13 2008
@@ -16,7 +16,7 @@
import org.xml.sax.Attributes;
-import ch.qos.logback.core.CoreGlobal;
+import ch.qos.logback.core.CoreConstants;
import ch.qos.logback.core.boolex.EventEvaluator;
import ch.qos.logback.core.filter.EvaluatorFilter;
import ch.qos.logback.core.joran.spi.InterpretationContext;
@@ -120,7 +120,7 @@
ec.popObject();
try {
- Map<String, EventEvaluator> evaluatorMap = (Map<String, EventEvaluator>) context.getObject(CoreGlobal.EVALUATOR_MAP);
+ Map<String, EventEvaluator> evaluatorMap = (Map<String, EventEvaluator>) context.getObject(CoreConstants.EVALUATOR_MAP);
evaluatorMap.put(evaluator.getName(), evaluator);
} catch (Exception ex) {
addError(
Modified: logback/trunk/logback-core/src/main/java/ch/qos/logback/core/joran/action/AppenderRefAction.java
==============================================================================
--- logback/trunk/logback-core/src/main/java/ch/qos/logback/core/joran/action/AppenderRefAction.java (original)
+++ logback/trunk/logback-core/src/main/java/ch/qos/logback/core/joran/action/AppenderRefAction.java Thu Oct 30 21:41:13 2008
@@ -13,7 +13,7 @@
import org.xml.sax.Attributes;
import ch.qos.logback.core.Appender;
-import ch.qos.logback.core.CoreGlobal;
+import ch.qos.logback.core.CoreConstants;
import ch.qos.logback.core.joran.spi.InterpretationContext;
import ch.qos.logback.core.spi.AppenderAttachable;
import ch.qos.logback.core.util.OptionHelper;
@@ -63,7 +63,7 @@
+ "]. Did you define it below in the config file?";
inError = true;
addError(msg);
- addError("See " + CoreGlobal.CODES_URL
+ addError("See " + CoreConstants.CODES_URL
+ "#appender_order for more details.");
return;
}
Modified: logback/trunk/logback-core/src/main/java/ch/qos/logback/core/joran/action/ConversionRuleAction.java
==============================================================================
--- logback/trunk/logback-core/src/main/java/ch/qos/logback/core/joran/action/ConversionRuleAction.java (original)
+++ logback/trunk/logback-core/src/main/java/ch/qos/logback/core/joran/action/ConversionRuleAction.java Thu Oct 30 21:41:13 2008
@@ -15,7 +15,7 @@
import org.xml.sax.Attributes;
-import ch.qos.logback.core.CoreGlobal;
+import ch.qos.logback.core.CoreConstants;
import ch.qos.logback.core.joran.spi.InterpretationContext;
import ch.qos.logback.core.util.OptionHelper;
@@ -56,10 +56,10 @@
}
try {
- Map<String, String> ruleRegistry = (Map) context.getObject(CoreGlobal.PATTERN_RULE_REGISTRY);
+ Map<String, String> ruleRegistry = (Map) context.getObject(CoreConstants.PATTERN_RULE_REGISTRY);
if(ruleRegistry == null) {
ruleRegistry = new HashMap<String, String>();
- context.putObject(CoreGlobal.PATTERN_RULE_REGISTRY, ruleRegistry);
+ context.putObject(CoreConstants.PATTERN_RULE_REGISTRY, ruleRegistry);
}
// put the new rule into the rule registry
addInfo("registering conversion word "+conversionWord+" with class ["+converterClass+"]");
Modified: logback/trunk/logback-core/src/main/java/ch/qos/logback/core/joran/spi/PropertySetter.java
==============================================================================
--- logback/trunk/logback-core/src/main/java/ch/qos/logback/core/joran/spi/PropertySetter.java (original)
+++ logback/trunk/logback-core/src/main/java/ch/qos/logback/core/joran/spi/PropertySetter.java Thu Oct 30 21:41:13 2008
@@ -25,7 +25,7 @@
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
-import ch.qos.logback.core.CoreGlobal;
+import ch.qos.logback.core.CoreConstants;
import ch.qos.logback.core.joran.action.IADataForComplexProperty;
import ch.qos.logback.core.spi.ContextAwareBase;
import ch.qos.logback.core.util.AggregationType;
@@ -458,7 +458,7 @@
boolean isBuildableFromString(Class<?> parameterClass) {
try {
- Method valueOfMethod = parameterClass.getMethod(CoreGlobal.VALUE_OF,
+ Method valueOfMethod = parameterClass.getMethod(CoreConstants.VALUE_OF,
STING_CLASS_PARAMETER);
int mod = valueOfMethod.getModifiers();
if (Modifier.isStatic(mod)) {
@@ -474,11 +474,11 @@
Object buildFromString(Class type, String val) {
try {
- Method valueOfMethod = type.getMethod(CoreGlobal.VALUE_OF,
+ Method valueOfMethod = type.getMethod(CoreConstants.VALUE_OF,
STING_CLASS_PARAMETER);
return valueOfMethod.invoke(null, val);
} catch (Exception e) {
- addError("Failed to invoke " + CoreGlobal.VALUE_OF
+ addError("Failed to invoke " + CoreConstants.VALUE_OF
+ "{} method in class [" + type.getName() + "] with value [" + val
+ "]");
return null;
@@ -487,7 +487,7 @@
protected Object convertEnum(String val, Class type) {
try {
- Method m = type.getMethod(CoreGlobal.VALUE_OF, STING_CLASS_PARAMETER);
+ Method m = type.getMethod(CoreConstants.VALUE_OF, STING_CLASS_PARAMETER);
return m.invoke(null, val);
} catch (Exception e) {
addError("Failed to convert value [" + val + "] to enum ["
Modified: logback/trunk/logback-core/src/main/java/ch/qos/logback/core/net/SyslogAppenderBase.java
==============================================================================
--- logback/trunk/logback-core/src/main/java/ch/qos/logback/core/net/SyslogAppenderBase.java (original)
+++ logback/trunk/logback-core/src/main/java/ch/qos/logback/core/net/SyslogAppenderBase.java Thu Oct 30 21:41:13 2008
@@ -15,7 +15,7 @@
import java.net.UnknownHostException;
import ch.qos.logback.core.AppenderBase;
-import ch.qos.logback.core.CoreGlobal;
+import ch.qos.logback.core.CoreConstants;
import ch.qos.logback.core.Layout;
/**
@@ -27,7 +27,7 @@
*/
public abstract class SyslogAppenderBase<E> extends AppenderBase<E> {
- final static String SYSLOG_LAYOUT_URL = CoreGlobal.CODES_URL + "#syslog_layout";
+ final static String SYSLOG_LAYOUT_URL = CoreConstants.CODES_URL + "#syslog_layout";
final static int MSG_SIZE_LIMIT = 256*1024;
Layout<E> layout;
Modified: logback/trunk/logback-core/src/main/java/ch/qos/logback/core/pattern/PatternLayoutBase.java
==============================================================================
--- logback/trunk/logback-core/src/main/java/ch/qos/logback/core/pattern/PatternLayoutBase.java (original)
+++ logback/trunk/logback-core/src/main/java/ch/qos/logback/core/pattern/PatternLayoutBase.java Thu Oct 30 21:41:13 2008
@@ -13,7 +13,7 @@
import java.util.Map;
import ch.qos.logback.core.Context;
-import ch.qos.logback.core.CoreGlobal;
+import ch.qos.logback.core.CoreConstants;
import ch.qos.logback.core.LayoutBase;
import ch.qos.logback.core.pattern.parser.Node;
import ch.qos.logback.core.pattern.parser.Parser;
@@ -58,7 +58,7 @@
// contextMap is more specific than the default map
Context context = getContext();
if (context != null) {
- Map<String, String> contextMap = (Map) context.getObject(CoreGlobal.PATTERN_RULE_REGISTRY);
+ Map<String, String> contextMap = (Map) context.getObject(CoreConstants.PATTERN_RULE_REGISTRY);
if (contextMap != null) {
effectiveMap.putAll(contextMap);
}
Modified: logback/trunk/logback-core/src/main/java/ch/qos/logback/core/pattern/parser/TokenStream.java
==============================================================================
--- logback/trunk/logback-core/src/main/java/ch/qos/logback/core/pattern/parser/TokenStream.java (original)
+++ logback/trunk/logback-core/src/main/java/ch/qos/logback/core/pattern/parser/TokenStream.java Thu Oct 30 21:41:13 2008
@@ -12,7 +12,7 @@
import java.util.List;
import java.util.ArrayList;
-import ch.qos.logback.core.CoreGlobal;
+import ch.qos.logback.core.CoreConstants;
import ch.qos.logback.core.pattern.util.IEscapeUtil;
import ch.qos.logback.core.pattern.util.RegularEscapeUtil;
@@ -33,7 +33,7 @@
class TokenStream {
private static final char ESCAPE_CHAR = '\\';
- private static final char PERCENT_CHAR = CoreGlobal.PERCENT_CHAR;
+ private static final char PERCENT_CHAR = CoreConstants.PERCENT_CHAR;
private static final char LEFT_PARENTHESIS = '(';
private static final char RIGHT_PARENTHESIS = ')';
private static final char CURLY_LEFT = '{';
Modified: logback/trunk/logback-core/src/main/java/ch/qos/logback/core/pattern/util/AlmostAsIsEscapeUtil.java
==============================================================================
--- logback/trunk/logback-core/src/main/java/ch/qos/logback/core/pattern/util/AlmostAsIsEscapeUtil.java (original)
+++ logback/trunk/logback-core/src/main/java/ch/qos/logback/core/pattern/util/AlmostAsIsEscapeUtil.java Thu Oct 30 21:41:13 2008
@@ -1,6 +1,6 @@
package ch.qos.logback.core.pattern.util;
-import ch.qos.logback.core.CoreGlobal;
+import ch.qos.logback.core.CoreConstants;
import ch.qos.logback.core.rolling.helper.FileNamePattern;
/**
@@ -27,8 +27,8 @@
public void escape(String escapeChars, StringBuffer buf, char next,
int pointer) {
- if (next == CoreGlobal.PERCENT_CHAR) {
- buf.append(CoreGlobal.PERCENT_CHAR);
+ if (next == CoreConstants.PERCENT_CHAR) {
+ buf.append(CoreConstants.PERCENT_CHAR);
} else {
// restitute the escape char (because it was consumed
// before this method was called).
Modified: logback/trunk/logback-core/src/main/java/ch/qos/logback/core/util/OptionHelper.java
==============================================================================
--- logback/trunk/logback-core/src/main/java/ch/qos/logback/core/util/OptionHelper.java (original)
+++ logback/trunk/logback-core/src/main/java/ch/qos/logback/core/util/OptionHelper.java Thu Oct 30 21:41:13 2008
@@ -10,7 +10,7 @@
package ch.qos.logback.core.util;
import ch.qos.logback.core.Context;
-import ch.qos.logback.core.CoreGlobal;
+import ch.qos.logback.core.CoreConstants;
/**
* @author Ceki Gulcu
@@ -254,7 +254,7 @@
}
public static boolean isEmpty(String val) {
- return ((val == null) || CoreGlobal.EMPTY_STRING.equals(val));
+ return ((val == null) || CoreConstants.EMPTY_STRING.equals(val));
}
}
Modified: logback/trunk/logback-core/src/main/java/ch/qos/logback/core/util/StatusPrinter.java
==============================================================================
--- logback/trunk/logback-core/src/main/java/ch/qos/logback/core/util/StatusPrinter.java (original)
+++ logback/trunk/logback-core/src/main/java/ch/qos/logback/core/util/StatusPrinter.java Thu Oct 30 21:41:13 2008
@@ -16,7 +16,7 @@
import java.util.Iterator;
import ch.qos.logback.core.Context;
-import ch.qos.logback.core.CoreGlobal;
+import ch.qos.logback.core.CoreConstants;
import ch.qos.logback.core.Layout;
import ch.qos.logback.core.status.ErrorStatus;
import ch.qos.logback.core.status.Status;
@@ -94,7 +94,7 @@
String[] stringRep = ThrowableToStringArray.convert(t);
for (String s : stringRep) {
- if (s.startsWith(CoreGlobal.CAUSED_BY)) {
+ if (s.startsWith(CoreConstants.CAUSED_BY)) {
// nothing
} else if (Character.isDigit(s.charAt(0))) {
// if line resembles "48 common frames omitted"
@@ -103,7 +103,7 @@
// most of the time. just add a tab+"at"
sb.append("\tat ");
}
- sb.append(s).append(CoreGlobal.LINE_SEPARATOR);
+ sb.append(s).append(CoreConstants.LINE_SEPARATOR);
}
}
More information about the logback-dev
mailing list