logback-dev
Threads by month
- ----- 2025 -----
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- 9940 discussions

svn commit: r902 - in logback/trunk: logback-access/src/main/java/ch/qos/logback/access/net logback-classic/src/main/java/ch/qos/logback/classic/net logback-core/src/main/java/ch/qos/logback/core/rolling logback-examples/src/main/java/chapter4/mail
by noreply.seb@qos.ch 13 Nov '06
by noreply.seb@qos.ch 13 Nov '06
13 Nov '06
Author: seb
Date: Mon Nov 13 11:48:38 2006
New Revision: 902
Modified:
logback/trunk/logback-access/src/main/java/ch/qos/logback/access/net/SMTPAppender.java
logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/net/SMTPAppender.java
logback/trunk/logback-core/src/main/java/ch/qos/logback/core/rolling/SizeBasedTriggeringPolicy.java
logback/trunk/logback-core/src/main/java/ch/qos/logback/core/rolling/TimeBasedRollingPolicy.java
logback/trunk/logback-core/src/main/java/ch/qos/logback/core/rolling/TriggeringPolicy.java
logback/trunk/logback-examples/src/main/java/chapter4/mail/CounterBasedTP.java
Log:
changed TriggeringPolicy's file parameter to activeFile
Modified: logback/trunk/logback-access/src/main/java/ch/qos/logback/access/net/SMTPAppender.java
==============================================================================
--- logback/trunk/logback-access/src/main/java/ch/qos/logback/access/net/SMTPAppender.java (original)
+++ logback/trunk/logback-access/src/main/java/ch/qos/logback/access/net/SMTPAppender.java Mon Nov 13 11:48:38 2006
@@ -135,7 +135,7 @@
* Once an email is sent, the next one will not be sent unless a certain amount
* of time passed.
*/
- public boolean isTriggeringEvent(File file, Object eventObject) {
+ public boolean isTriggeringEvent(File activeFile, Object eventObject) {
AccessEvent event = (AccessEvent) eventObject;
if (TRIGGERING_STATUS_CODE <= event.getStatusCode()) {
Modified: logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/net/SMTPAppender.java
==============================================================================
--- logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/net/SMTPAppender.java (original)
+++ logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/net/SMTPAppender.java Mon Nov 13 11:48:38 2006
@@ -123,7 +123,7 @@
* This method returns <code>true</code>, if the event level has ERROR
* level or higher. Otherwise it returns <code>false</code>.
*/
- public boolean isTriggeringEvent(File file, Object eventObject) {
+ public boolean isTriggeringEvent(File activeFile, Object eventObject) {
LoggingEvent event = (LoggingEvent) eventObject;
return event.getLevel().isGreaterOrEqual(Level.ERROR);
}
Modified: logback/trunk/logback-core/src/main/java/ch/qos/logback/core/rolling/SizeBasedTriggeringPolicy.java
==============================================================================
--- logback/trunk/logback-core/src/main/java/ch/qos/logback/core/rolling/SizeBasedTriggeringPolicy.java (original)
+++ logback/trunk/logback-core/src/main/java/ch/qos/logback/core/rolling/SizeBasedTriggeringPolicy.java Mon Nov 13 11:48:38 2006
@@ -67,9 +67,9 @@
setMaxFileSize(maxFileSize);
}
- public boolean isTriggeringEvent(final File file, final Object event) {
+ public boolean isTriggeringEvent(final File activeFile, final Object event) {
//System.out.println("Size"+file.length());
- return (file.length() >= maxFileSizeAsLong);
+ return (activeFile.length() >= maxFileSizeAsLong);
}
public String getMaxFileSize() {
Modified: logback/trunk/logback-core/src/main/java/ch/qos/logback/core/rolling/TimeBasedRollingPolicy.java
==============================================================================
--- logback/trunk/logback-core/src/main/java/ch/qos/logback/core/rolling/TimeBasedRollingPolicy.java (original)
+++ logback/trunk/logback-core/src/main/java/ch/qos/logback/core/rolling/TimeBasedRollingPolicy.java Mon Nov 13 11:48:38 2006
@@ -283,7 +283,7 @@
}
}
- public boolean isTriggeringEvent(File file, final Object event) {
+ public boolean isTriggeringEvent(File activeFile, final Object event) {
long n = System.currentTimeMillis();
if (n >= nextCheck) {
Modified: logback/trunk/logback-core/src/main/java/ch/qos/logback/core/rolling/TriggeringPolicy.java
==============================================================================
--- logback/trunk/logback-core/src/main/java/ch/qos/logback/core/rolling/TriggeringPolicy.java (original)
+++ logback/trunk/logback-core/src/main/java/ch/qos/logback/core/rolling/TriggeringPolicy.java Mon Nov 13 11:48:38 2006
@@ -28,9 +28,9 @@
/**
* Should roll-over be triggered at this time?
*
- * @param file A reference to the currently active log file.
+ * @param activeFile A reference to the currently active log file.
* @param event A reference to the currently event.
* @return true if a roll-over should occur.
*/
- public boolean isTriggeringEvent(final File file, final Object event);
+ public boolean isTriggeringEvent(final File activeFile, final Object event);
}
Modified: logback/trunk/logback-examples/src/main/java/chapter4/mail/CounterBasedTP.java
==============================================================================
--- logback/trunk/logback-examples/src/main/java/chapter4/mail/CounterBasedTP.java (original)
+++ logback/trunk/logback-examples/src/main/java/chapter4/mail/CounterBasedTP.java Mon Nov 13 11:48:38 2006
@@ -23,7 +23,7 @@
static int LIMIT = 1024;
int counter = 0;
- public boolean isTriggeringEvent(File file, Object event) {
+ public boolean isTriggeringEvent(File activeFile, Object event) {
counter++;
if (counter == LIMIT) {
1
0

13 Nov '06
http://bugzilla.qos.ch/show_bug.cgi?id=29
Summary: Bad parsing of pattern containing ')'
Product: logback-classic
Version: unspecified
Platform: All
OS/Version: All
Status: NEW
Severity: major
Priority: P1
Component: Other
AssignedTo: logback-dev(a)qos.ch
ReportedBy: noreply.sebastien(a)qos.ch
The following config does not work with classic's PatternLayout:
<Pattern>%date %-5level [%thread] (%file:%line) %logger - %msg%n</Pattern>
Everything after the ')' is not displayed. Replacing ( and ) with [ and ] makes
everything go well.
--
Configure bugmail: http://bugzilla.qos.ch/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
1
1
Online report : http://localhost:8090/continuum/servlet/continuum/target/ProjectBuild.vm/vi…
Build statistics:
State: Ok
Previous State: Failed
Started at: Mon, 13 Nov 2006 11:40:49 +0100
Finished at: Mon, 13 Nov 2006 11:41:08 +0100
Total time: 18s
Build Trigger: Schedule
Exit code: 0
Building machine hostname: pixie
Operating system : Linux(unknown)
Java version : 1.5.0_08(Sun Microsystems Inc.)
Changes
seb Modified SyslogAppender so that events containing an exception result in multiple sendings to the server.
Updated test class.
/logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/net/SyslogAppender.java
/logback/trunk/logback-classic/src/test/java/ch/qos/logback/classic/net/MockSyslogServer.java
/logback/trunk/logback-classic/src/test/java/ch/qos/logback/classic/net/SyslogAppenderTest.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/net/SyslogWriter.java
seb updated test case
/logback/trunk/logback-classic/src/test/java/ch/qos/logback/classic/PatternLayoutTest.java
****************************************************************************
Output:
****************************************************************************
[INFO] Scanning for projects...
[INFO] ----------------------------------------------------------------------------
[INFO] Building Logback Classic Module
[INFO] task-segment: [clean, install]
[INFO] ----------------------------------------------------------------------------
[INFO] [clean:clean]
[INFO] Deleting directory /opt/continuum-1.0.3/apps/continuum/working-directory/46/target
[INFO] Deleting directory /opt/continuum-1.0.3/apps/continuum/working-directory/46/target/classes
[INFO] Deleting directory /opt/continuum-1.0.3/apps/continuum/working-directory/46/target/test-classes
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:compile]
Compiling 70 source files to /opt/continuum-1.0.3/apps/continuum/working-directory/46/target/classes
[INFO] [resources:testResources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:testCompile]
Compiling 61 source files to /opt/continuum-1.0.3/apps/continuum/working-directory/46/target/test-classes
[INFO] [surefire:test]
[INFO] Surefire report directory: /opt/continuum-1.0.3/apps/continuum/working-directory/46/target/surefire-reports
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running ch.qos.logback.classic.net.LoggingEventSerializationTest
Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.126 sec
Running ch.qos.logback.classic.control.CLCTest
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.018 sec
Running ch.qos.logback.classic.LoggerContextTest
Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.035 sec
Running ch.qos.logback.classic.pattern.ClassNameAbbreviatorTest
Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.01 sec
Running ch.qos.logback.classic.pattern.MDCConverterTest
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.011 sec
Running ch.qos.logback.classic.MDCTest
Exiting a
Exiting b
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.012 sec
Running ch.qos.logback.classic.BasicLoggerTest
|-WARN in ch.qos.logback.core.appender.ListAppender[null] - Attempted to append to non started appender [null].
Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.034 sec
Running ch.qos.logback.classic.PatternLayoutTest
Tests run: 9, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.021 sec
Running ch.qos.logback.classic.MessageFormattingTest
Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.026 sec
Running ch.qos.logback.classic.boolex.JaninoEventEvaluatorTest
INFO] Some message
INFO] Some message
timestamp > 10]: 10327 nanos
x.matches(message): 17758 nanos
Tests run: 11, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.788 sec
Running ch.qos.logback.classic.net.SMTPAppenderTest
Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.264 sec
Running ch.qos.logback.classic.joran.EvaluatorJoranTest
LOGBACK: No context given for ch.qos.logback.core.joran.action.NestedSimplePropertyIA
|-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - Ignoring debug attribute.
|-WARN in ch.qos.logback.classic.joran.action.EvaluatorAction - Assuming default evaluator class [ch.qos.logback.classic.boolex.JaninoEventEvaluator]
|-INFO in ch.qos.logback.classic.joran.action.EvaluatorAction - Adding evaluator named [IGNORE_EVAL] to the object stack
|-INFO in ch.qos.logback.classic.joran.action.EvaluatorAction - Starting evaluator named [IGNORE_EVAL]
|-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.ConsoleAppender]
|-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [CONSOLE]
|-INFO in ch.qos.logback.core.joran.action.AppenderAction - Popping appender named [CONSOLE] from the object stack
|-INFO in ch.qos.logback.classic.joran.action.LevelAction - root level set to DEBUG
|-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [CONSOLE to Logger[root]
|-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - Ignoring debug attribute.
|-WARN in ch.qos.logback.classic.joran.action.EvaluatorAction - Assuming default evaluator class [ch.qos.logback.classic.boolex.JaninoEventEvaluator]
|-INFO in ch.qos.logback.classic.joran.action.EvaluatorAction - Adding evaluator named [IGNORE_EVAL] to the object stack
|-INFO in ch.qos.logback.classic.joran.action.EvaluatorAction - Starting evaluator named [IGNORE_EVAL]
|-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.ConsoleAppender]
|-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [CONSOLE]
|-INFO in ch.qos.logback.core.joran.action.AppenderAction - Popping appender named [CONSOLE] from the object stack
|-INFO in ch.qos.logback.classic.joran.action.LevelAction - root level set to DEBUG
|-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [CONSOLE to Logger[root]
|-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - Ignoring debug attribute.
|-WARN in ch.qos.logback.classic.joran.action.EvaluatorAction - Assuming default evaluator class [ch.qos.logback.classic.boolex.JaninoEventEvaluator]
|-INFO in ch.qos.logback.classic.joran.action.EvaluatorAction - Adding evaluator named [IGNORE_EVAL] to the object stack
|-INFO in ch.qos.logback.classic.joran.action.EvaluatorAction - Starting evaluator named [IGNORE_EVAL]
|-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.ConsoleAppender]
|-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [CONSOLE]
|-INFO in ch.qos.logback.core.joran.action.AppenderAction - Popping appender named [CONSOLE] from the object stack
|-INFO in ch.qos.logback.classic.joran.action.LevelAction - root level set to DEBUG
|-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [CONSOLE to Logger[root]
2006-11-13 11:41:03,434 DEBUG - hello
java.lang.Exception: test
at ch.qos.logback.classic.joran.EvaluatorJoranTest.testIgnoreMarker(EvaluatorJoranTest.java:76)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.maven.surefire.junit.JUnitTestSet.execute(JUnitTestSet.java:210)
at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:135)
at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:122)
at org.apache.maven.surefire.Surefire.run(Surefire.java:129)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:225)
at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:747)
2006-11-13 11:41:03,436 DEBUG - hello ignore
|-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - Ignoring debug attribute.
|-WARN in ch.qos.logback.classic.joran.action.EvaluatorAction - Assuming default evaluator class [ch.qos.logback.classic.boolex.JaninoEventEvaluator]
|-INFO in ch.qos.logback.classic.joran.action.EvaluatorAction - Adding evaluator named [IGNORE_EVAL] to the object stack
|-INFO in ch.qos.logback.classic.joran.action.EvaluatorAction - Starting evaluator named [IGNORE_EVAL]
|-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.ConsoleAppender]
|-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [CONSOLE]
|-INFO in ch.qos.logback.core.joran.action.AppenderAction - Popping appender named [CONSOLE] from the object stack
|-INFO in ch.qos.logback.classic.joran.action.LevelAction - root level set to DEBUG
|-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [CONSOLE to Logger[root]
|-ERROR in ch.qos.logback.classic.spi.LoggerContextAwareBase@3c3c9217 - Exception thrown for evaluator named [IGNORE_EVAL] ch.qos.logback.core.boolex.EvaluationException: Evaluator [IGNORE_EVAL] caused an exception
ch.qos.logback.core.boolex.EvaluationException: Evaluator [IGNORE_EVAL] caused an exception
at ch.qos.logback.core.boolex.JaninoEventEvaluatorBase.evaluate(JaninoEventEvaluatorBase.java:72)
at ch.qos.logback.classic.pattern.ThrowableInformationConverter.convert(ThrowableInformationConverter.java:107)
at ch.qos.logback.core.pattern.FormattingConverter.write(FormattingConverter.java:32)
at ch.qos.logback.core.pattern.PatternLayoutBase.writeLoopOnConverters(PatternLayoutBase.java:115)
at ch.qos.logback.classic.PatternLayout.doLayout(PatternLayout.java:163)
at ch.qos.logback.classic.PatternLayout.doLayout(PatternLayout.java:167)
at ch.qos.logback.core.WriterAppender.subAppend(WriterAppender.java:267)
at ch.qos.logback.core.WriterAppender.append(WriterAppender.java:114)
at ch.qos.logback.core.AppenderBase.doAppend(AppenderBase.java:71)
at ch.qos.logback.core.spi.AppenderAttachableImpl.appendLoopOnAppenders(AppenderAttachableImpl.java:51)
at ch.qos.logback.classic.Logger.appendLoopOnAppenders(Logger.java:286)
at ch.qos.logback.classic.Logger.callAppenders(Logger.java:270)
at ch.qos.logback.classic.Logger.filterAndLog(Logger.java:422)
at ch.qos.logback.classic.Logger.debug(Logger.java:399)
at ch.qos.logback.classic.joran.EvaluatorJoranTest.testIgnoreMarker(EvaluatorJoranTest.java:76)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.maven.surefire.junit.JUnitTestSet.execute(JUnitTestSet.java:210)
at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:135)
at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:122)
at org.apache.maven.surefire.Surefire.run(Surefire.java:129)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:225)
at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:747)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.codehaus.janino.ScriptEvaluator.evaluate(Unknown Source)
at ch.qos.logback.core.boolex.JaninoEventEvaluatorBase.evaluate(JaninoEventEvaluatorBase.java:65)
... 40 more
Caused by: java.lang.NullPointerException
at SC.eval(ANONYMOUS.java:2)
... 46 more
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.077 sec
Running ch.qos.logback.classic.pattern.ConverterTest
java.lang.Exception: Bogus exception
java.lang.Exception: Bogus exception
Caller+0 at ch.qos.logback.classic.pattern.ConverterTest.testCallerData(ConverterTest.java:187)
Caller+1 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
Tests run: 14, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.131 sec
Running ch.qos.logback.classic.DynamicLoggerContextTest
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.261 sec
Running ch.qos.logback.classic.control.TestAction
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.046 sec
Running ch.qos.logback.classic.db.DBAppenderTest
[Server@7d95d4fe]: [Thread[main,5,main]]: checkRunning(false) entered
[Server@7d95d4fe]: [Thread[main,5,main]]: checkRunning(false) exited
[Server@7d95d4fe]: [Thread[main,5,main]]: setDatabaseName(0,test)
[Server@7d95d4fe]: [Thread[main,5,main]]: checkRunning(false) entered
[Server@7d95d4fe]: [Thread[main,5,main]]: checkRunning(false) exited
[Server@7d95d4fe]: [Thread[main,5,main]]: setDatabasePath(0,mem:test;sql.enforce_strict_size=true)
[Server@62acc57]: [Thread[main,5,main]]: checkRunning(false) entered
[Server@62acc57]: [Thread[main,5,main]]: checkRunning(false) exited
[Server@62acc57]: [Thread[main,5,main]]: setDatabaseName(0,test)
[Server@62acc57]: [Thread[main,5,main]]: checkRunning(false) entered
[Server@62acc57]: [Thread[main,5,main]]: checkRunning(false) exited
[Server@62acc57]: [Thread[main,5,main]]: setDatabasePath(0,mem:test;sql.enforce_strict_size=true)
[Server@7971f189]: [Thread[main,5,main]]: checkRunning(false) entered
[Server@7971f189]: [Thread[main,5,main]]: checkRunning(false) exited
[Server@7971f189]: [Thread[main,5,main]]: setDatabaseName(0,test)
[Server@7971f189]: [Thread[main,5,main]]: checkRunning(false) entered
[Server@7971f189]: [Thread[main,5,main]]: checkRunning(false) exited
[Server@7971f189]: [Thread[main,5,main]]: setDatabasePath(0,mem:test;sql.enforce_strict_size=true)
value: someValue
[Server@1f8166e5]: [Thread[main,5,main]]: checkRunning(false) entered
[Server@1f8166e5]: [Thread[main,5,main]]: checkRunning(false) exited
[Server@1f8166e5]: [Thread[main,5,main]]: setDatabaseName(0,test)
[Server@1f8166e5]: [Thread[main,5,main]]: checkRunning(false) entered
[Server@1f8166e5]: [Thread[main,5,main]]: checkRunning(false) exited
[Server@1f8166e5]: [Thread[main,5,main]]: setDatabasePath(0,mem:test;sql.enforce_strict_size=true)
Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.025 sec
Running ch.qos.logback.classic.util.InitializationTest
TEST 11:41:05.931 [main] DEBUG c.q.l.c.util.InitializationTest - Hello-didily-odily
TEST 11:41:05.931 [main] DEBUG c.q.l.c.util.InitializationTest - Hello-didily-odily
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.012 sec
Running ch.qos.logback.classic.LoggerPerfTest
Running on pixie
Average log time for disabled statements: 6.0 nanos.
Running on pixie
Average log time for disabled statements: 20.0 nanos.
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.608 sec
Running ch.qos.logback.classic.html.HTMLLayoutTest
Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.432 sec
Running ch.qos.logback.classic.control.RandomUtilTest
Resulting average is 5.01783
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.09 sec
Running ch.qos.logback.classic.net.SocketAppenderTest
Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.441 sec
Running ch.qos.logback.classic.net.SyslogAppenderTest
MockSyslogServer listening on port 14501
MockSyslogServer listening on port 14502
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.228 sec
Running ch.qos.logback.classic.control.ScenarioMakerTest
CreateLogger(ljggekfdysousqjomupjiohnoxq)
CreateLogger(bvifcmybxtrznamfkzlsiqmhofw)
CreateLogger(ogkozkyaunwfk.xwjjgisoszlqenwjinmb.uhhdwizvnotxhlyzjns.mhzsrnhrzjwcbjablolmlymhkwrelapoixghaacnxkidyoinstososm.rzbtjobjewalmeqyxblexlwqrwpchucbptqmfec)
SetLevel(INFO, ogkozkyaunwfk.xwjjgisoszlqenwjinmb.uhhdwizvnotxhlyzjns.mhzsrnhrzjwcbjablolmlymhkwrelapoixghaacnxkidyoinstososm.rzbtjobjewalmeqyxblexlwqrwpchucbptqmfec)
CreateLogger(ogkozkyaunwfk.xwjjgisoszlqenwjinmb.uhhdwizvnotxhlyzjns.mhzsrnhrzjwcbjablolmlymhkwrelapoixghaacnxkidyoinstososm.sconxzboswtpubzgjindmbwskxewvkshzpkistnlniocijaesypjwclzswiy)
SetLevel(DEBUG, ogkozkyaunwfk.xwjjgisoszlqenwjinmb.uhhdwizvnotxhlyzjns.mhzsrnhrzjwcbjablolmlymhkwrelapoixghaacnxkidyoinstososm.sconxzboswtpubzgjindmbwskxewvkshzpkistnlniocijaesypjwclzswiy)
CreateLogger(ogkozkyaunwfk.xwjjgisoszlqenwjinmb.uhhdwizvnotxhlyzjns.mhzsrnhrzjwcbjablolmlymhkwrelapoixghaacnxkidyoinstososm.rzeafvjxmvberuvmbyjxzospogus)
CreateLogger(ogkozkyaunwfk.xwjjgisoszlqenwjinmb.uhhdwizvnotxhlyzjns.mhzsrnhrzjwcbjablolmlymhkwrelapoixghaacnxkidyoinstososm.qxkpagyuzpvcltrpjvokzt)
CreateLogger(ogkozkyaunwfk.xwjjgisoszlqenwjinmb.uhhdwizvnotxhlyzjns.mhzsrnhrzjwcbjablolmlymhkwrelapoixghaacnxkidyoinstososm.jprxvqteaohafrmugfxbyvijkbyfbnos)
CreateLogger(ogkozkyaunwfk.xwjjgisoszlqenwjinmb.uhhdwizvnotxhlyzjns.njquybkyqphfcnulkqpwtbihgddbxqgmrxicelaonogjcxlitpryimdak.dgklnhbjmlrndpdnwsfjkrmhuyoxauvfhibjqtpt)
SetLevel(INFO, ogkozkyaunwfk.xwjjgisoszlqenwjinmb.uhhdwizvnotxhlyzjns.njquybkyqphfcnulkqpwtbihgddbxqgmrxicelaonogjcxlitpryimdak.dgklnhbjmlrndpdnwsfjkrmhuyoxauvfhibjqtpt)
CreateLogger(ogkozkyaunwfk.xwjjgisoszlqenwjinmb.uhhdwizvnotxhlyzjns.njquybkyqphfcnulkqpwtbihgddbxqgmrxicelaonogjcxlitpryimdak.bhstraisbrdcarvltibccjz)
CreateLogger(ogkozkyaunwfk.xwjjgisoszlqenwjinmb.uhhdwizvnotxhlyzjns.njquybkyqphfcnulkqpwtbihgddbxqgmrxicelaonogjcxlitpryimdak.rripvpurpstjpfzym)
CreateLogger(ogkozkyaunwfk.xwjjgisoszlqenwjinmb.uhhdwizvnotxhlyzjns.njquybkyqphfcnulkqpwtbihgddbxqgmrxicelaonogjcxlitpryimdak.ltckthuwgtraszksrfdcodspvbyyxgfolfltqhdfojmg)
CreateLogger(ogkozkyaunwfk.xwjjgisoszlqenwjinmb.uhhdwizvnotxhlyzjns.szgkwydrxisfhwtsdvraummfnhaytablthtypgqejfavo.xzbjclbwpoptlfiakyudsqtzgtozjlgbcbfszunisgexouuqlqsxs)
CreateLogger(ogkozkyaunwfk.xwjjgisoszlqenwjinmb.uhhdwizvnotxhlyzjns.szgkwydrxisfhwtsdvraummfnhaytablthtypgqejfavo.azcikomyelznxndbcxbvmkpwmscqt)
CreateLogger(ogkozkyaunwfk.xwjjgisoszlqenwjinmb.uhhdwizvnotxhlyzjns.szgkwydrxisfhwtsdvraummfnhaytablthtypgqejfavo.bjunncpxyawurawxkwjdwnclzhfxaaqrafpabrfjlse)
CreateLogger(ogkozkyaunwfk.xwjjgisoszlqenwjinmb.uhhdwizvnotxhlyzjns.szgkwydrxisfhwtsdvraummfnhaytablthtypgqejfavo.wew)
CreateLogger(ogkozkyaunwfk.xwjjgisoszlqenwjinmb.uhhdwizvnotxhlyzjns.szgkwydrxisfhwtsdvraummfnhaytablthtypgqejfavo.plpy)
CreateLogger(ogkozkyaunwfk.xwjjgisoszlqenwjinmb.uhhdwizvnotxhlyzjns.txoasruuwnggozsdqs.lyqiuiiovzrwujbuxzdnoidmhxtxqeepufkmyeaanwwsgt)
SetLevel(DEBUG, ogkozkyaunwfk.xwjjgisoszlqenwjinmb.uhhdwizvnotxhlyzjns.txoasruuwnggozsdqs.lyqiuiiovzrwujbuxzdnoidmhxtxqeepufkmyeaanwwsgt)
CreateLogger(ogkozkyaunwfk.xwjjgisoszlqenwjinmb.uhhdwizvnotxhlyzjns.txoasruuwnggozsdqs.dsncrzuhikbayfarjaxwppvccgildpgtepnlqeftnhrinzbkijoetxpirjiaiqysas)
SetLevel(DEBUG, ogkozkyaunwfk.xwjjgisoszlqenwjinmb.uhhdwizvnotxhlyzjns.txoasruuwnggozsdqs.dsncrzuhikbayfarjaxwppvccgildpgtepnlqeftnhrinzbkijoetxpirjiaiqysas)
CreateLogger(ogkozkyaunwfk.xwjjgisoszlqenwjinmb.uhhdwizvnotxhlyzjns.txoasruuwnggozsdqs.ofxljzobrludcnejulwxducplonrkqwqhlrfanxafyg)
CreateLogger(ogkozkyaunwfk.xwjjgisoszlqenwjinmb.uhhdwizvnotxhlyzjns.txoasruuwnggozsdqs.murkmlkvgkerioavjfrppltnddtpqvczne)
CreateLogger(ogkozkyaunwfk.xwjjgisoszlqenwjinmb.uhhdwizvnotxhlyzjns.ouhiltsaabrdybgsfkaaiafscevlllnzt.gnarpakghuhtcfmkhfbauzcbbtlq)
CreateLogger(ogkozkyaunwfk.xwjjgisoszlqenwjinmb.uhhdwizvnotxhlyzjns.ouhiltsaabrdybgsfkaaiafscevlllnzt.godcftqbrwkjdfrrioyzwmrmwpspvpztqbqqoulruyjkjbtndeenwonvcjnuczjegnxfjcsqehkn)
CreateLogger(ogkozkyaunwfk.xwjjgisoszlqenwjinmb.uhhdwizvnotxhlyzjns.ouhiltsaabrdybgsfkaaiafscevlllnzt.iwajobbvpsuuqvgjsk)
CreateLogger(ogkozkyaunwfk.xwjjgisoszlqenwjinmb.uhhdwizvnotxhlyzjns.ouhiltsaabrdybgsfkaaiafscevlllnzt.oyxsymrviydbmnelebbkvahofgbzxxrlpdkcxsypldjzosdbodjpuoljiohjdcw)
CreateLogger(ogkozkyaunwfk.xwjjgisoszlqenwjinmb.uhhdwizvnotxhlyzjns.ompilgezwcluzuffjdyxbaltrgfsfhxnxnwwkveuibkqiphq.ukdwyjklntgkvcdhzusmrj)
SetLevel(ERROR, ogkozkyaunwfk.xwjjgisoszlqenwjinmb.uhhdwizvnotxhlyzjns.ompilgezwcluzuffjdyxbaltrgfsfhxnxnwwkveuibkqiphq.ukdwyjklntgkvcdhzusmrj)
CreateLogger(ogkozkyaunwfk.xwjjgisoszlqenwjinmb.uhhdwizvnotxhlyzjns.t.g)
SetLevel(DEBUG, ogkozkyaunwfk.xwjjgisoszlqenwjinmb.uhhdwizvnotxhlyzjns.t.g)
CreateLogger(ogkozkyaunwfk.xwjjgisoszlqenwjinmb.uhhdwizvnotxhlyzjns.t.wexcnbkawjvfoeizazdxhlaqjuxb)
CreateLogger(ogkozkyaunwfk.xwjjgisoszlqenwjinmb.uhhdwizvnotxhlyzjns.t.xchowexpifwleubiymndxaxlxftetgp)
CreateLogger(ogkozkyaunwfk.xwjjgisoszlqenwjinmb.uhhdwizvnotxhlyzjns.t.bekqkxuuctmptezricsktevakkgpizcuitftrohmhpluhbzgaarqxljo)
CreateLogger(ogkozkyaunwfk.xwjjgisoszlqenwjinmb.uhhdwizvnotxhlyzjns.t.mxysyqbjuggrklmsjgvoajkyzjuurvtpztlajniok)
SetLevel(DEBUG, ogkozkyaunwfk.xwjjgisoszlqenwjinmb.uhhdwizvnotxhlyzjns.t.mxysyqbjuggrklmsjgvoajkyzjuurvtpztlajniok)
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.037 sec
Running ch.qos.logback.classic.joran.BasicJoranTest
|-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.appender.ListAppender]
|-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [LIST]
|-INFO in ch.qos.logback.core.joran.action.AppenderAction - Popping appender named [LIST] from the object stack
|-INFO in ch.qos.logback.classic.joran.action.LevelAction - root level set to DEBUG
|-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [LIST to Logger[root]
|-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - End of configuration.
|-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.appender.ListAppender]
|-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [LIST]
|-INFO in ch.qos.logback.core.joran.action.AppenderAction - Popping appender named [LIST] from the object stack
|-INFO in ch.qos.logback.classic.joran.action.LevelAction - ch.qos.logback.classic.joran level set to INFO
|-INFO in ch.qos.logback.classic.joran.action.LevelAction - root level set to DEBUG
|-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [LIST to Logger[root]
|-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - End of configuration.
LOGBACK: No context given for ch.qos.logback.core.joran.action.NestedSimplePropertyIA
|-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - Ignoring debug attribute.
|-WARN in ch.qos.logback.classic.joran.action.EvaluatorAction - Assuming default evaluator class [ch.qos.logback.classic.boolex.JaninoEventEvaluator]
|-INFO in ch.qos.logback.classic.joran.action.EvaluatorAction - Adding evaluator named [helloEval] to the object stack
|-INFO in ch.qos.logback.core.joran.action.MatcherAction - matcher named as [m]
|-INFO in ch.qos.logback.core.joran.action.MatcherAction - Popping appender named [m] from the object stack
|-INFO in ch.qos.logback.classic.joran.action.EvaluatorAction - Starting evaluator named [helloEval]
|-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.ConsoleAppender]
|-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [CONSOLE]
|-INFO in ch.qos.logback.core.joran.action.AppenderAction - Popping appender named [CONSOLE] from the object stack
|-INFO in ch.qos.logback.classic.joran.action.LevelAction - root level set to DEBUG
|-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [CONSOLE to Logger[root]
2006-11-13 11:41:07,796 DEBUG - toto
Caller+0 at ch.qos.logback.classic.joran.BasicJoranTest.testEval(BasicJoranTest.java:81)
Caller+1 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
Caller+2 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
Caller+3 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
2006-11-13 11:41:07,796 DEBUG - hello world
LOGBACK: No context given for ch.qos.logback.core.joran.action.NestedSimplePropertyIA
|-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - Ignoring debug attribute.
|-INFO in ch.qos.logback.core.joran.action.NestedComponentIA - was deemed applicable for [configuration][turboFilter]
|-INFO in ch.qos.logback.core.joran.action.NestedComponentIA - Pushing component <turboFilter> on top of the object stack.
|-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.ConsoleAppender]
|-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [CONSOLE]
|-INFO in ch.qos.logback.core.joran.action.AppenderAction - Popping appender named [CONSOLE] from the object stack
|-INFO in ch.qos.logback.classic.joran.action.LevelAction - root level set to DEBUG
|-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [CONSOLE to Logger[root]
LOGBACK: No context given for ch.qos.logback.core.joran.action.NestedSimplePropertyIA
|-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - Ignoring debug attribute.
|-INFO in ch.qos.logback.core.joran.action.NestedComponentIA - was deemed applicable for [configuration][turboFilter]
|-INFO in ch.qos.logback.core.joran.action.NestedComponentIA - Pushing component <turboFilter> on top of the object stack.
|-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.ConsoleAppender]
|-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [CONSOLE]
|-INFO in ch.qos.logback.core.joran.action.AppenderAction - Popping appender named [CONSOLE] from the object stack
|-INFO in ch.qos.logback.classic.joran.action.LevelAction - root level set to DEBUG
|-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [CONSOLE to Logger[root]
Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.041 sec
Results :
Tests run: 106, Failures: 0, Errors: 0, Skipped: 0
[INFO] [jar:jar]
[INFO] Building jar: /opt/continuum-1.0.3/apps/continuum/working-directory/46/target/logback-classic-0.6-SNAPSHOT.jar
[INFO] [jar:jar {execution: bundle-test-jar}]
[INFO] [jar:test-jar {execution: bundle-test-jar}]
[INFO] Building jar: /opt/continuum-1.0.3/apps/continuum/working-directory/46/target/logback-classic-0.6-SNAPSHOT-tests.jar
[INFO] [install:install]
[INFO] Installing /opt/continuum-1.0.3/apps/continuum/working-directory/46/target/logback-classic-0.6-SNAPSHOT.jar to /root/.m2/repository/ch/qos/logback/logback-classic/0.6-SNAPSHOT/logback-classic-0.6-SNAPSHOT.jar
[INFO] Installing /opt/continuum-1.0.3/apps/continuum/working-directory/46/target/logback-classic-0.6-SNAPSHOT-tests.jar to /root/.m2/repository/ch/qos/logback/logback-classic/0.6-SNAPSHOT/logback-classic-0.6-SNAPSHOT-tests.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 16 seconds
[INFO] Finished at: Mon Nov 13 11:41:08 CET 2006
[INFO] Final Memory: 13M/147M
[INFO] ------------------------------------------------------------------------
****************************************************************************
1
0

svn commit: r901 - logback/trunk/logback-classic/src/test/java/ch/qos/logback/classic
by noreply.seb@qos.ch 13 Nov '06
by noreply.seb@qos.ch 13 Nov '06
13 Nov '06
Author: seb
Date: Mon Nov 13 11:37:37 2006
New Revision: 901
Modified:
logback/trunk/logback-classic/src/test/java/ch/qos/logback/classic/PatternLayoutTest.java
Log:
updated test case
Modified: logback/trunk/logback-classic/src/test/java/ch/qos/logback/classic/PatternLayoutTest.java
==============================================================================
--- logback/trunk/logback-classic/src/test/java/ch/qos/logback/classic/PatternLayoutTest.java (original)
+++ logback/trunk/logback-classic/src/test/java/ch/qos/logback/classic/PatternLayoutTest.java Mon Nov 13 11:37:37 2006
@@ -89,7 +89,7 @@
public void testWithParenthesis() {
PatternLayout pl = new PatternLayout();
- pl.setPattern("(%msg:%msg) %msg");
+ pl.setPattern("\\(%msg:%msg\\) %msg");
Context context = new LoggerContext();
pl.setContext(context);
pl.start();
1
0

svn commit: r900 - in logback/trunk: logback-classic/src/main/java/ch/qos/logback/classic/net logback-classic/src/test/java/ch/qos/logback/classic/net logback-core/src/main/java/ch/qos/logback/core/net
by noreply.seb@qos.ch 13 Nov '06
by noreply.seb@qos.ch 13 Nov '06
13 Nov '06
Author: seb
Date: Mon Nov 13 11:36:19 2006
New Revision: 900
Modified:
logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/net/SyslogAppender.java
logback/trunk/logback-classic/src/test/java/ch/qos/logback/classic/net/MockSyslogServer.java
logback/trunk/logback-classic/src/test/java/ch/qos/logback/classic/net/SyslogAppenderTest.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/net/SyslogWriter.java
Log:
Modified SyslogAppender so that events containing an exception result in multiple sendings to the server.
Updated test class.
Modified: logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/net/SyslogAppender.java
==============================================================================
--- logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/net/SyslogAppender.java (original)
+++ logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/net/SyslogAppender.java Mon Nov 13 11:36:19 2006
@@ -9,12 +9,15 @@
*/
package ch.qos.logback.classic.net;
+import java.io.IOException;
+
import ch.qos.logback.classic.PatternLayout;
import ch.qos.logback.classic.pattern.SyslogStartConverter;
import ch.qos.logback.classic.spi.LoggingEvent;
import ch.qos.logback.classic.util.LevelToSyslogSeverity;
import ch.qos.logback.core.Layout;
import ch.qos.logback.core.net.SyslogAppenderBase;
+import ch.qos.logback.core.net.SyslogWriter;
/**
*
@@ -23,31 +26,37 @@
public class SyslogAppender extends SyslogAppenderBase {
String prefixPattern;
-
- static final public String DEFAULT_SUFFIX_PATTERN = "[%thread] %logger %msg %exception";
-
+ PatternLayout prefixLayout;
+
+ static final public String DEFAULT_SUFFIX_PATTERN = "[%thread] %logger %msg";
+
public Layout buildLayout(String facilityStr) {
-
- PatternLayout pl = new PatternLayout();
- pl.getInstanceConverterMap().put("syslogStart", SyslogStartConverter.class.getName());
+
+ prefixPattern = "%syslogStart{" + facilityStr + "}%nopex";
+ prefixLayout = new PatternLayout();
+ prefixLayout.getInstanceConverterMap().put("syslogStart",
+ SyslogStartConverter.class.getName());
+ prefixLayout.setPattern(prefixPattern);
+ prefixLayout.setContext(getContext());
+ prefixLayout.start();
- if(prefixPattern == null) {
- prefixPattern = "%syslogStart{"+facilityStr+"}";
- }
+ PatternLayout fullLayout = new PatternLayout();
+ fullLayout.getInstanceConverterMap().put("syslogStart",
+ SyslogStartConverter.class.getName());
- if(suffixPattern == null) {
+ if (suffixPattern == null) {
suffixPattern = DEFAULT_SUFFIX_PATTERN;
}
-
- pl.setPattern(prefixPattern+suffixPattern);
- pl.setContext(getContext());
- pl.start();
- return pl;
+
+ fullLayout.setPattern(prefixPattern + suffixPattern);
+ fullLayout.setContext(getContext());
+ fullLayout.start();
+ return fullLayout;
}
-
+
/*
- * Convert a level to equivalent syslog severity. Only levels for printing methods
- * i.e DEBUG, WARN, INFO and ERROR are converted.
+ * Convert a level to equivalent syslog severity. Only levels for printing
+ * methods i.e DEBUG, WARN, INFO and ERROR are converted.
*
* @see ch.qos.logback.core.net.SyslogAppenderBase#getSeverityForEvent(java.lang.Object)
*/
@@ -57,4 +66,24 @@
return LevelToSyslogSeverity.convert(event);
}
+ @Override
+ protected void postProcess(Object eventObject, SyslogWriter sw) {
+ LoggingEvent event = (LoggingEvent) eventObject;
+
+ String prefix = prefixLayout.doLayout(event);
+
+ if (event.getThrowableInformation() != null) {
+ String[] strRep = event.getThrowableInformation().getThrowableStrRep();
+ try {
+ for (String line : strRep) {
+ sw.write(prefix + line);
+ sw.flush();
+ }
+ } catch (IOException e) {
+ }
+
+ }
+
+ }
+
}
Modified: logback/trunk/logback-classic/src/test/java/ch/qos/logback/classic/net/MockSyslogServer.java
==============================================================================
--- logback/trunk/logback-classic/src/test/java/ch/qos/logback/classic/net/MockSyslogServer.java (original)
+++ logback/trunk/logback-classic/src/test/java/ch/qos/logback/classic/net/MockSyslogServer.java Mon Nov 13 11:36:19 2006
@@ -44,9 +44,9 @@
for (int i = 0; i < loopLen; i++) {
byte[] buf = new byte[2048];
DatagramPacket packet = new DatagramPacket(buf, buf.length);
- System.out.println("Waiting for message");
+ //System.out.println("Waiting for message");
socket.receive(packet);
- System.out.println("Got message");
+ //System.out.println("Got message");
String msg = new String(buf, 0, packet.getLength());
msgList.add(msg);
}
Modified: logback/trunk/logback-classic/src/test/java/ch/qos/logback/classic/net/SyslogAppenderTest.java
==============================================================================
--- logback/trunk/logback-classic/src/test/java/ch/qos/logback/classic/net/SyslogAppenderTest.java (original)
+++ logback/trunk/logback-classic/src/test/java/ch/qos/logback/classic/net/SyslogAppenderTest.java Mon Nov 13 11:36:19 2006
@@ -44,7 +44,7 @@
sa.setSyslogHost("localhost");
sa.setFacility("MAIL");
sa.setPort(port);
- sa.setSuffixPattern("[%thread] %logger %msg %exception");
+ sa.setSuffixPattern("[%thread] %logger %msg");
sa.start();
assertTrue(sa.isStarted());
@@ -69,13 +69,13 @@
String first = "<\\d{2}>\\w{3} \\d{2} \\d{2}(:\\d{2}){2} \\w* ";
String threadName = Thread.currentThread().getName();
assertTrue(msg.matches(first + "\\[" + threadName + "\\] " + loggerName
- + " " + logMsg + " "));
+ + " " + logMsg));
}
public void testException() throws InterruptedException {
int port = MockSyslogServer.PORT + 2;
- MockSyslogServer mockServer = new MockSyslogServer(1, port);
+ MockSyslogServer mockServer = new MockSyslogServer(21, port);
mockServer.start();
// give MockSyslogServer head start
Thread.sleep(100);
@@ -87,7 +87,7 @@
sa.setSyslogHost("localhost");
sa.setFacility("MAIL");
sa.setPort(port);
- sa.setSuffixPattern("[%thread] %logger %msg %exception");
+ sa.setSuffixPattern("[%thread] %logger %msg");
sa.start();
assertTrue(sa.isStarted());
@@ -104,19 +104,23 @@
// much sooner than that.
mockServer.join(8000);
assertTrue(mockServer.finished);
- assertEquals(1, mockServer.msgList.size());
+
+ //message + 20 lines of stacktrace
+ assertEquals(21, mockServer.msgList.size());
+// int i = 0;
+// for (String line: mockServer.msgList) {
+// System.out.println(i++ + ": " + line);
+// }
+
String msg = mockServer.msgList.get(0);
-
String expected = "<"
+ (SyslogConstants.LOG_MAIL + SyslogConstants.DEBUG_SEVERITY) + ">";
assertTrue(msg.startsWith(expected));
-
-// String first = "<\\d{2}>\\w{3} \\d{2} \\d{2}(:\\d{2}){2} \\w* ";
-// String threadName = Thread.currentThread().getName();
-// String expectedResult = first + "\\[" + threadName + "\\] " + loggerName
-// + " " + logMsg + " " + ex.getClass().getCanonicalName() + ": " + exMsg + "\n";
-// assertTrue(msg.matches(expectedResult));
-
- // fail("check exceptions");
+
+ String expectedPrefix = "<\\d{2}>\\w{3} \\d{2} \\d{2}(:\\d{2}){2} \\w* ";
+ String threadName = Thread.currentThread().getName();
+ String expectedResult = expectedPrefix + "\\[" + threadName + "\\] " + loggerName
+ + " " + logMsg;
+ assertTrue(msg.matches(expectedResult));
}
}
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 Mon Nov 13 11:36:19 2006
@@ -16,16 +16,16 @@
protected String suffixPattern;
SyslogWriter sw;
int port = SyslogConstants.SYSLOG_PORT;
-
+
public void start() {
int errorCount = 0;
if (facilityStr == null) {
addError("The Facility option is mandatory");
errorCount++;
}
-
+
facility = facilityStringToint(facilityStr);
-
+
try {
sw = new SyslogWriter(syslogHost, port);
} catch (UnknownHostException e) {
@@ -35,42 +35,47 @@
errorCount++;
addError("Failed to bind to a random datagram socket ", e);
}
-
- if(layout == null) {
+
+ if (layout == null) {
layout = buildLayout(facilityStr);
}
-
- if(errorCount == 0) {
+
+ if (errorCount == 0) {
super.start();
}
}
-
+
abstract public Layout buildLayout(String facilityStr);
-
+
abstract public int getSeverityForEvent(Object eventObject);
-
+
@Override
protected void append(Object eventObject) {
- if(!isStarted()) {
+ if (!isStarted()) {
return;
}
-
+
try {
String msg = layout.doLayout(eventObject);
sw.write(msg);
sw.flush();
-
- } catch(IOException ioe) {
- addError("Failed to send diagram to "+syslogHost, ioe);
+ postProcess(eventObject, sw);
+ } catch (IOException ioe) {
+ addError("Failed to send diagram to " + syslogHost, ioe);
stop();
}
}
+
+ protected void postProcess(Object event, SyslogWriter sw) {
+
+ }
/**
* Returns the integer value corresponding to the named syslog facility.
*
- * @throws IllegalArgumentException if the facility string is not recognized
- * */
+ * @throws IllegalArgumentException
+ * if the facility string is not recognized
+ */
static public int facilityStringToint(String facilityStr) {
if ("KERN".equalsIgnoreCase(facilityStr)) {
return SyslogConstants.LOG_KERN;
@@ -113,11 +118,11 @@
} else if ("LOCAL7".equalsIgnoreCase(facilityStr)) {
return SyslogConstants.LOG_LOCAL7;
} else {
- throw new IllegalArgumentException(facilityStr + " is not a valid syslog facility string");
+ throw new IllegalArgumentException(facilityStr
+ + " is not a valid syslog facility string");
}
}
-
/**
* Returns the value of the <b>SyslogHost</b> option.
*/
@@ -128,7 +133,7 @@
/**
* The <b>SyslogHost</b> option is the name of the the syslog host where log
* output should go.
- *
+ *
* <b>WARNING</b> If the SyslogHost is not set, then this appender will fail.
*/
public void setSyslogHost(String syslogHost) {
@@ -137,7 +142,7 @@
/**
* Returns the string value of the <b>Facility</b> option.
- *
+ *
* See {@link #setFacility} for the set of allowed values.
*/
public String getFacility() {
@@ -145,16 +150,17 @@
}
/**
- * The <b>Facility</b> option must be set one of the strings KERN,
- * USER, MAIL, DAEMON, AUTH, SYSLOG, LPR, NEWS, UUCP, CRON, AUTHPRIV, FTP,
- * NTP, AUDIT, ALERT, CLOCK, LOCAL0, LOCAL1, LOCAL2, LOCAL3, LOCAL4, LOCAL5,
+ * The <b>Facility</b> option must be set one of the strings KERN, USER,
+ * MAIL, DAEMON, AUTH, SYSLOG, LPR, NEWS, UUCP, CRON, AUTHPRIV, FTP, NTP,
+ * AUDIT, ALERT, CLOCK, LOCAL0, LOCAL1, LOCAL2, LOCAL3, LOCAL4, LOCAL5,
* LOCAL6, LOCAL7. Case is not important.
- *
- * <p>See {@link SyslogConstants} and RFC 3164 for more information about the
+ *
+ * <p>
+ * See {@link SyslogConstants} and RFC 3164 for more information about the
* <b>Facility</b> option.
*/
public void setFacility(String facilityStr) {
- if(facilityStr != null) {
+ if (facilityStr != null) {
facilityStr = facilityStr.trim();
}
this.facilityStr = facilityStr;
@@ -177,7 +183,7 @@
}
/**
- * You can override
+ * You can override
*/
public Layout getLayout() {
return layout;
@@ -186,7 +192,7 @@
public void setLayout(Layout layout) {
this.layout = layout;
}
-
+
@Override
public void stop() {
sw.close();
@@ -203,7 +209,7 @@
}
/**
- * The <b>suffixPattern</b> option specifies the fortmat of the
+ * The <b>suffixPattern</b> option specifies the fortmat of the
* non-standardized part the message sent to the syslog server.
*
* @param pattern
Modified: logback/trunk/logback-core/src/main/java/ch/qos/logback/core/net/SyslogWriter.java
==============================================================================
--- logback/trunk/logback-core/src/main/java/ch/qos/logback/core/net/SyslogWriter.java (original)
+++ logback/trunk/logback-core/src/main/java/ch/qos/logback/core/net/SyslogWriter.java Mon Nov 13 11:36:19 2006
@@ -12,7 +12,7 @@
* SyslogWriter is a wrapper around the {@link DatagramSocket} class so that it
* behaves like a {@link Writer}.
*/
-class SyslogWriter extends Writer {
+public class SyslogWriter extends Writer {
/**
* The maximum length after which we discard the existing string buffer and
1
0
Author: ceki
Date: Fri Nov 10 21:46:03 2006
New Revision: 899
Removed:
logback/trunk/updateBundle.sh
Log:
updateBundle.sh no longer needed
1
0

svn commit: r898 - in logback/trunk: logback-site/src/site/xdocTemplates logback-skin/src/main/resources/css
by noreply.ceki@qos.ch 10 Nov '06
by noreply.ceki@qos.ch 10 Nov '06
10 Nov '06
Author: ceki
Date: Fri Nov 10 21:43:16 2006
New Revision: 898
Modified:
logback/trunk/logback-site/src/site/xdocTemplates/shortIntro.xml
logback/trunk/logback-skin/src/main/resources/css/site.css
Log:
ongoing work on shortIntro.xml
minor changes to css/site.css
Modified: logback/trunk/logback-site/src/site/xdocTemplates/shortIntro.xml
==============================================================================
--- logback/trunk/logback-site/src/site/xdocTemplates/shortIntro.xml (original)
+++ logback/trunk/logback-site/src/site/xdocTemplates/shortIntro.xml Fri Nov 10 21:43:16 2006
@@ -266,8 +266,6 @@
statements.
</p>
- <!-- ========= CEKI: STOPPED HERE =================== -->
-
<p>
Here is a list of the three required steps in order to enable
logging in your application.
@@ -275,19 +273,19 @@
<ol>
- <li>Configure the logback environment. You can do it using
- several sophisticated ways. The BasicConfigurator is the
+ <li>Configure the logback environment. You can do so in several
+ more or less sophisticated ways. The BasicConfigurator is the
simplest but also least flexible. More on this later.</li>
<li>In every class where you wish to perform logging, retrieve a
- Logger instance by invoking the
+ <code>Logger</code> instance by invoking the
<code>org.slf4j.LoggerFactory</code> class'
- <code>getLogger()</code> method, passing the current class' name
+ <code>getLogger()</code> method, passing the current class name
or the class itself as parameter.</li>
<li>Use this logger instance by invoking its printing methods,
- namely the debug(), info(), warn() and error() methods. This
- will produce logging output on the configured appenders.</li>
+ namely the debug(), info(), warn() and error(). This will
+ produce logging output on the configured appenders.</li>
</ol>
@@ -302,8 +300,8 @@
</p>
<p>
The Logger class is part of the classic module. On the other
- hand, Appenders and Layouts are part of the core
- module. Interestingly enough, the core has no notion of loggers.
+ hand, Appenders and Layouts are part of the core module. For the
+ sake of genericity, logback-core has no notion of loggers.
</p>
<h3>Logger context</h3>
@@ -313,8 +311,8 @@
certain log statements while allowing others to print
unhindered. This capability assumes that the logging space, that
is, the space of all possible logging statements, is categorized
- according to some developer-chosen criteria. This categorization
- is an inherent part of loggers.
+ according to some developer-chosen criteria. In logback, this
+ categorization is an inherent part of loggers.
</p>
<p>
@@ -341,17 +339,21 @@
This naming scheme should be familiar to most developers.
</p>
<p>
- The root logger resides at the top of the logger hierarchy.
- It is exceptional in that it always exists. Like every
- logger, it can be retrieved by its name, like this:
+ The root logger resides at the top of the logger hierarchy. It
+ is exceptional in that it is part of every hierarchy at its
+ inception. Like every logger, it can be retrieved by its name,
+ as follows:
</p>
- <div class="source"><pre>Logger rootLogger = LoggerFactory.getLogger(LoggerContext.<em>ROOT_NAME</em>);</pre></div>
+ <div class="source"><pre>Logger rootLogger = LoggerFactory.getLogger(<a href="apidocs/constant-values.html#ch.qos.logback.classic.LoggerContext.ROOT_NAME">LoggerContext.<em>ROOT_NAME</em></a>);</pre></div>
<p>
All other loggers are also retrieved with the class static
- <code>LoggerFactory.getLogger</code> method. This method takes the name
- of the desired logger as a parameter. Some of the basic
- methods in the <code>Logger</code> interface are listed below.
+ <code>getLogger</code> method found in the <b>CHECK THE
+ URL</b><a
+ href="http://www.slf4j.org/javadocs/org/slf4j/Logger.html">org.slf4j.LoggerFactory</a>
+ class. This method takes the name of the desired logger as a
+ parameter. Some of the basic methods in the <code>Logger</code>
+ interface are listed below.
</p>
<div class="source"><pre>package org.slf4j;
@@ -366,11 +368,11 @@
}</pre></div>
<p>
- Loggers may be assigned levels. The set of possible levels,
- that is DEBUG, INFO, WARN and ERROR are defined in the
- <em>ch.qos.logback.classic.Level</em> class. In logback, the level class cannot
- be sub-classed, because a much better approach exist in the form
- of Marker objects.
+ Loggers may be assigned levels. The set of possible levels, that
+ is DEBUG, INFO, WARN and ERROR are defined in the
+ <code>ch.qos.logback.classic.Level</code> class. Note that in
+ logback, the level class is final and cannot be derived as a
+ much more flexible approach exist in the form of Marker objects.
</p>
<p>
@@ -382,24 +384,22 @@
<div class="definition">
<div class="deftitle">Level Inheritance</div>
<p>
- The inherited level for a given logger <em>L</em>,
- is equal to the first non-null level in the logger context, starting at
- <em>L</em> and proceeding upwards in the context towards the root logger.
+ The effective level for a given logger <em>L</em>, is equal to
+ the first non-null level in its hierarchy, starting at
+ <em>L</em> itself and proceeding upwards in the context
+ towards the root logger.
</p>
</div>
+
<p>
- In a <code>Logger</code> object, the situation where no level was assigned
- means that the <code>level</code> attribute of that logger is null. It is then
- its <em>effective level</em> attribute that shows the inherited value.
- </p>
- <p>
- To ensure that all loggers can eventually inherit a level,
- the root logger always has an assigned level. By default, its level is DEBUG.
+ To ensure that all loggers can eventually inherit a level, the
+ root logger always has an assigned level. By default, this level
+ is DEBUG.
</p>
<p>
- Below are four examples with various assigned level values
- and the resulting inherited levels according to the level inheritance
- rule.
+ Below are four examples with various assigned level values and
+ the resulting effective (inherited) levels according to the
+ level inheritance rule.
</p>
<em>Example 1</em>
@@ -417,7 +417,7 @@
</th>
<th>
- Inherited
+ Effective
<br />
level
</th>
@@ -465,7 +465,7 @@
</th>
<th>
- Inherited
+ Effective
<br />
level
</th>
@@ -512,7 +512,7 @@
level
</th>
<th>
- Inherited
+ Effective
<br />
level
</th>
@@ -561,7 +561,7 @@
level
</th>
<th>
- Inherited
+ Effective
<br />
level
</th>
@@ -589,36 +589,35 @@
</tr>
</table>
- <p>
- In example 4 above, the loggers <code>root</code> and <code>X</code>
- and are assigned the levels <code>DEBUG</code> and
- <code>INFO</code> respectively. The loggers <code>X.Y</code> and
- <code>X.Y.Z</code> inherits their level value from their nearest
- parent <code>X</code>, which has an assigned level.
+ <!-- ========= CEKI: STOPPED HERE =================== -->
+
+ <p>In example 4 above, the loggers <code>root</code> and
+ <code>X</code> and are assigned the levels <code>DEBUG</code> and
+ <code>INFO</code> respectively. The loggers <code>X.Y</code> and
+ <code>X.Y.Z</code> inherit their level value from their nearest
+ parent <code>X</code>, which has an assigned level.
</p>
<h3>Printing methods</h3>
- <p>
- By definition, the printing method determines the level of a
- logging request. For example, if <code>L</code>
- is a logger instance, then the statement <code>L.info("..")</code>
- is a logging request of level INFO.
+
+ <p>By definition, the printing method determines the level of a
+ logging request. For example, if <code>L</code> is a logger
+ instance, then the statement <code>L.info("..")</code> is a
+ logging request of level INFO.
</p>
- <p>
- A logging request is said to be <em>enabled</em>
- if its level is higher than or equal to the level of its
- logger. Otherwise, the request is said to be
- <em>disabled</em>. A logger without an assigned level will inherit one from
- the context. This rule is summarized below.
+
+ <p>A logging request is said to be <em>enabled</em> if its level
+ is higher than or equal to the level of its logger. Otherwise, the
+ request is said to be <em>disabled</em>. A logger without an
+ assigned level will inherit one from the context. This rule is
+ summarized below.
</p>
+
<div class="definition">
<div class="deftitle">Basic Selection Rule</div>
- <p>
- A log request of level <em>p</em>
- in a logger with (either assigned or inherited,
- whichever is appropriate) level <em>q</em>, is enabled if
- <em>p >= q</em>.
+ <p>A log request of level <em>p</em> in a logger with an
+ effective level <em>q</em>, is enabled if <em>p >= q</em>.
</p>
</div>
@@ -628,15 +627,16 @@
<code>DEBUG < INFO < WARN < ERROR</code>.
</p>
- <p>
- In a more graphic way, here is how the selection rule works: in the following
- table, the horizontal header shows the level of the logging request, while the
- vertical header shows the level of the logger.
+ <p>In a more graphic way, here is how the selection rule works: in
+ the following table, the vertical header shows the the level of
+ the logging request, designated by <em>p</em>, while the
+ horizontal header shows effective level of the logger, designated
+ by <em>q</em>.
</p>
<table>
<tr>
- <td></td>
+ <th><span style="align:center"><em>p</em>/<em>q</em></span></th>
<th>DEBUG</th>
<th>INFO</th>
<th>WARN</th>
@@ -645,29 +645,29 @@
<tr>
<th>DEBUG</th>
<td><span class="greenBold">YES</span></td>
- <td><span class="greenBold">YES</span></td>
- <td><span class="greenBold">YES</span></td>
- <td><span class="greenBold">YES</span></td>
+ <td><span class="redBold">NO</span></td>
+ <td><span class="redBold">NO</span></td>
+ <td><span class="redBold">NO</span></td>
</tr>
<tr>
<th>INFO</th>
- <td><span class="redBold">NO</span></td>
- <td><span class="greenBold">YES</span></td>
<td><span class="greenBold">YES</span></td>
<td><span class="greenBold">YES</span></td>
+ <td><span class="redBold">NO</span></td>
+ <td><span class="redBold">NO</span></td>
</tr>
<tr>
<th>WARN</th>
- <td><span class="redBold">NO</span></td>
- <td><span class="redBold">NO</span></td>
<td><span class="greenBold">YES</span></td>
<td><span class="greenBold">YES</span></td>
+ <td><span class="greenBold">YES</span></td>
+ <td><span class="redBold">NO</span></td>
</tr>
<tr>
<th>ERROR</th>
- <td><span class="redBold">NO</span></td>
- <td><span class="redBold">NO</span></td>
- <td><span class="redBold">NO</span></td>
+ <td><span class="greenBold">YES</span></td>
+ <td><span class="greenBold">YES</span></td>
+ <td><span class="greenBold">YES</span></td>
<td><span class="greenBold">YES</span></td>
</tr>
</table>
@@ -677,27 +677,27 @@
<div class="source"><pre>// get a logger instance named "com.foo", with an <span class="blue">INFO</span> level.
Logger logger = LoggerFactory.getLogger("com.foo");
//set its Level to <span class="blue">INFO</span>
-logger.setLevel(Level.INFO);
+logger.setLevel(Level. <span class="blue">INFO</span>);
Logger barlogger = LoggerFactory.getLogger("com.foo.Bar");
-// This request is enabled, because <span class="green">WARN</span> >= <span class="blue">INFO</span>
-logger.<span class="green">warn</span>("Low fuel level.");
+// This request is enabled, because <span class="green bold">WARN</span> >= <span class="blue">INFO</span>
+logger.<span class="green bold">warn</span>("Low fuel level.");
-// This request is disabled, because <span class="green">DEBUG</span> < <span class="blue">INFO</span>.
-logger.<span class="green">debug</span>("Starting search for nearest gas station.");
+// This request is disabled, because <span class="green bold">DEBUG</span> < <span class="blue">INFO</span>.
+logger.<span class="green bold">debug</span>("Starting search for nearest gas station.");
// The logger instance barlogger, named "com.foo.Bar",
// will inherit its level from the logger named
// "com.foo" Thus, the following request is enabled
-// because <span class="green">INFO</span> >= <span class="blue">INFO</span>.
-barlogger.<span class="green">info</span>("Located nearest gas station.");
+// because <span class="green bold">INFO</span> >= <span class="blue">INFO</span>.
+barlogger.<span class="green bold">info</span>("Located nearest gas station.");
-// This request is disabled, because<span class="green">DEBUG</span> < <span class="blue">INFO</span>.
-barlogger.<span class="green">debug</span>("Exiting gas station search");</pre></div>
+// This request is disabled, because <span class="green bold">DEBUG</span> < <span class="blue">INFO</span>.
+barlogger.<span class="green bold">debug</span>("Exiting gas station search");</pre></div>
<h3>Retrieving Loggers</h3>
<p>
- Calling the <code>getLogger</code>
+ Calling the <code><a href="/apidocs/org/slf4j/LoggerFactory.html#getLogger(java.lang.String)">LoggerFactory.getLogger</a></code>
method with the same name will always return a reference to
the exact same logger object.
</p>
Modified: logback/trunk/logback-skin/src/main/resources/css/site.css
==============================================================================
--- logback/trunk/logback-skin/src/main/resources/css/site.css (original)
+++ logback/trunk/logback-skin/src/main/resources/css/site.css Fri Nov 10 21:43:16 2006
@@ -29,12 +29,13 @@
body,td,select,input,li {
font-family: Verdana, Helvetica, Arial, sans-serif;
- font-size: 13px;
+ /* font-size: 13px; */
}
+/* it's a bad idea to use fixed font sized */
code {
font-family: Courier, monospace;
- font-size: 13px;
+ /* font-size: 13px; */
}
a {
@@ -80,7 +81,7 @@
h2 {
padding: 2px 2px 1px 0px;
border: 0px solid #999;
- color: navy;
+ color: #333;
/*background-color: #ddd;*/ /*background-color: rgb(144,223,144);*/
background-color: white;
font-weight: 900;
@@ -90,8 +91,7 @@
h3 {
padding: 2px 2px 2px 0px;
border: 0px solid #aaa;
- /*color: #900;*/
- color: navy;
+ color: #333;
/*background-color: #eee;*/
background-color: white;
font-weight: normal;
@@ -365,4 +365,26 @@
.option {
border: 1px solid black;
font-family: Arial, sans-serif;
-}
\ No newline at end of file
+}
+
+.bold{
+ font-weight: bold;
+}
+
+.big {
+ font-size: 110%;
+}
+
+.highlight {
+ width: 300px;
+ float: right;
+ display: inline;
+ font-weight: bolder;
+ border:1px solid #000;
+ background:#FFCC99;
+ padding-top: 0px;
+ padding-left: 1ex;
+ padding-right: 1ex;
+ margin-left: 3em;
+ margin-right: 3em;
+}
1
0
Author: ceki
Date: Fri Nov 10 21:41:06 2006
New Revision: 897
Modified:
logback/trunk/pom.xml
Log:
Added a reference to a snapshot repository. This prevents accidental deployment on release repository.
Modified: logback/trunk/pom.xml
==============================================================================
--- logback/trunk/pom.xml (original)
+++ logback/trunk/pom.xml Fri Nov 10 21:41:06 2006
@@ -80,7 +80,7 @@
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
- <version>1.1.0-beta0</version>
+ <version>1.1.0-RC0</version>
</dependency>
<dependency>
<groupId>hsqldb</groupId>
@@ -241,9 +241,16 @@
<id>pixie</id>
<url>scp://pixie/var/www/logback.qos.ch/htdocs/</url>
</site>
+
<repository>
<id>pixie</id>
<url>scp://pixie/var/mvnrepo/</url>
</repository>
+
+ <snapshotRepository>
+ <id>pixie-snapshot</id>
+ <url>scp://pixie/var/mvnrepo-snapshots/</url>
+ </snapshotRepository>
+
</distributionManagement>
</project>
\ No newline at end of file
1
0
Online report : http://localhost:8090/continuum/servlet/continuum/target/ProjectBuild.vm/vi…
Build statistics:
State: Failed
Previous State: Ok
Started at: Fri, 10 Nov 2006 19:20:49 +0100
Finished at: Fri, 10 Nov 2006 19:21:05 +0100
Total time: 16s
Build Trigger: Schedule
Exit code: 1
Building machine hostname: pixie
Operating system : Linux(unknown)
Java version : 1.5.0_08(Sun Microsystems Inc.)
Changes
seb added a test method in PatternLayoutTest to test bug #29
/logback/trunk/logback-classic/src/test/java/ch/qos/logback/classic/PatternLayoutTest.java
/logback/trunk/logback-core/src/test/java/ch/qos/logback/core/pattern/parser/AbstractPatternLayoutBaseTest.java
****************************************************************************
Output:
****************************************************************************
[INFO] Scanning for projects...
[INFO] ----------------------------------------------------------------------------
[INFO] Building Logback Classic Module
[INFO] task-segment: [clean, install]
[INFO] ----------------------------------------------------------------------------
[INFO] [clean:clean]
[INFO] Deleting directory /opt/continuum-1.0.3/apps/continuum/working-directory/46/target
[INFO] Deleting directory /opt/continuum-1.0.3/apps/continuum/working-directory/46/target/classes
[INFO] Deleting directory /opt/continuum-1.0.3/apps/continuum/working-directory/46/target/test-classes
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:compile]
Compiling 70 source files to /opt/continuum-1.0.3/apps/continuum/working-directory/46/target/classes
[INFO] [resources:testResources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:testCompile]
Compiling 61 source files to /opt/continuum-1.0.3/apps/continuum/working-directory/46/target/test-classes
[INFO] [surefire:test]
[INFO] Surefire report directory: /opt/continuum-1.0.3/apps/continuum/working-directory/46/target/surefire-reports
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running ch.qos.logback.classic.net.LoggingEventSerializationTest
Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.099 sec
Running ch.qos.logback.classic.control.CLCTest
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.01 sec
Running ch.qos.logback.classic.LoggerContextTest
Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.021 sec
Running ch.qos.logback.classic.pattern.ClassNameAbbreviatorTest
Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.011 sec
Running ch.qos.logback.classic.pattern.MDCConverterTest
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.011 sec
Running ch.qos.logback.classic.MDCTest
Exiting a
Exiting b
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.011 sec
Running ch.qos.logback.classic.BasicLoggerTest
|-WARN in ch.qos.logback.core.appender.ListAppender[null] - Attempted to append to non started appender [null].
Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.016 sec
Running ch.qos.logback.classic.PatternLayoutTest
Tests run: 9, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.024 sec <<< FAILURE!
Running ch.qos.logback.classic.MessageFormattingTest
Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.016 sec
Running ch.qos.logback.classic.boolex.JaninoEventEvaluatorTest
INFO] Some message
INFO] Some message
timestamp > 10]: 10297 nanos
x.matches(message): 13486 nanos
Tests run: 11, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.494 sec
Running ch.qos.logback.classic.net.SMTPAppenderTest
Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.157 sec
Running ch.qos.logback.classic.joran.EvaluatorJoranTest
LOGBACK: No context given for ch.qos.logback.core.joran.action.NestedSimplePropertyIA
|-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - Ignoring debug attribute.
|-WARN in ch.qos.logback.classic.joran.action.EvaluatorAction - Assuming default evaluator class [ch.qos.logback.classic.boolex.JaninoEventEvaluator]
|-INFO in ch.qos.logback.classic.joran.action.EvaluatorAction - Adding evaluator named [IGNORE_EVAL] to the object stack
|-INFO in ch.qos.logback.classic.joran.action.EvaluatorAction - Starting evaluator named [IGNORE_EVAL]
|-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.ConsoleAppender]
|-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [CONSOLE]
|-INFO in ch.qos.logback.core.joran.action.AppenderAction - Popping appender named [CONSOLE] from the object stack
|-INFO in ch.qos.logback.classic.joran.action.LevelAction - root level set to DEBUG
|-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [CONSOLE to Logger[root]
|-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - Ignoring debug attribute.
|-WARN in ch.qos.logback.classic.joran.action.EvaluatorAction - Assuming default evaluator class [ch.qos.logback.classic.boolex.JaninoEventEvaluator]
|-INFO in ch.qos.logback.classic.joran.action.EvaluatorAction - Adding evaluator named [IGNORE_EVAL] to the object stack
|-INFO in ch.qos.logback.classic.joran.action.EvaluatorAction - Starting evaluator named [IGNORE_EVAL]
|-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.ConsoleAppender]
|-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [CONSOLE]
|-INFO in ch.qos.logback.core.joran.action.AppenderAction - Popping appender named [CONSOLE] from the object stack
|-INFO in ch.qos.logback.classic.joran.action.LevelAction - root level set to DEBUG
|-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [CONSOLE to Logger[root]
|-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - Ignoring debug attribute.
|-WARN in ch.qos.logback.classic.joran.action.EvaluatorAction - Assuming default evaluator class [ch.qos.logback.classic.boolex.JaninoEventEvaluator]
|-INFO in ch.qos.logback.classic.joran.action.EvaluatorAction - Adding evaluator named [IGNORE_EVAL] to the object stack
|-INFO in ch.qos.logback.classic.joran.action.EvaluatorAction - Starting evaluator named [IGNORE_EVAL]
|-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.ConsoleAppender]
|-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [CONSOLE]
|-INFO in ch.qos.logback.core.joran.action.AppenderAction - Popping appender named [CONSOLE] from the object stack
|-INFO in ch.qos.logback.classic.joran.action.LevelAction - root level set to DEBUG
|-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [CONSOLE to Logger[root]
2006-11-10 19:21:01,935 DEBUG - hello
java.lang.Exception: test
at ch.qos.logback.classic.joran.EvaluatorJoranTest.testIgnoreMarker(EvaluatorJoranTest.java:76)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.maven.surefire.junit.JUnitTestSet.execute(JUnitTestSet.java:210)
at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:135)
at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:122)
at org.apache.maven.surefire.Surefire.run(Surefire.java:129)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:225)
at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:747)
2006-11-10 19:21:01,935 DEBUG - hello ignore
|-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - Ignoring debug attribute.
|-WARN in ch.qos.logback.classic.joran.action.EvaluatorAction - Assuming default evaluator class [ch.qos.logback.classic.boolex.JaninoEventEvaluator]
|-INFO in ch.qos.logback.classic.joran.action.EvaluatorAction - Adding evaluator named [IGNORE_EVAL] to the object stack
|-INFO in ch.qos.logback.classic.joran.action.EvaluatorAction - Starting evaluator named [IGNORE_EVAL]
|-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.ConsoleAppender]
|-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [CONSOLE]
|-INFO in ch.qos.logback.core.joran.action.AppenderAction - Popping appender named [CONSOLE] from the object stack
|-INFO in ch.qos.logback.classic.joran.action.LevelAction - root level set to DEBUG
|-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [CONSOLE to Logger[root]
|-ERROR in ch.qos.logback.classic.spi.LoggerContextAwareBase@54acb158 - Exception thrown for evaluator named [IGNORE_EVAL] ch.qos.logback.core.boolex.EvaluationException: Evaluator [IGNORE_EVAL] caused an exception
ch.qos.logback.core.boolex.EvaluationException: Evaluator [IGNORE_EVAL] caused an exception
at ch.qos.logback.core.boolex.JaninoEventEvaluatorBase.evaluate(JaninoEventEvaluatorBase.java:72)
at ch.qos.logback.classic.pattern.ThrowableInformationConverter.convert(ThrowableInformationConverter.java:107)
at ch.qos.logback.core.pattern.FormattingConverter.write(FormattingConverter.java:32)
at ch.qos.logback.core.pattern.PatternLayoutBase.writeLoopOnConverters(PatternLayoutBase.java:115)
at ch.qos.logback.classic.PatternLayout.doLayout(PatternLayout.java:163)
at ch.qos.logback.classic.PatternLayout.doLayout(PatternLayout.java:167)
at ch.qos.logback.core.WriterAppender.subAppend(WriterAppender.java:267)
at ch.qos.logback.core.WriterAppender.append(WriterAppender.java:114)
at ch.qos.logback.core.AppenderBase.doAppend(AppenderBase.java:71)
at ch.qos.logback.core.spi.AppenderAttachableImpl.appendLoopOnAppenders(AppenderAttachableImpl.java:51)
at ch.qos.logback.classic.Logger.appendLoopOnAppenders(Logger.java:286)
at ch.qos.logback.classic.Logger.callAppenders(Logger.java:270)
at ch.qos.logback.classic.Logger.filterAndLog(Logger.java:422)
at ch.qos.logback.classic.Logger.debug(Logger.java:399)
at ch.qos.logback.classic.joran.EvaluatorJoranTest.testIgnoreMarker(EvaluatorJoranTest.java:76)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.maven.surefire.junit.JUnitTestSet.execute(JUnitTestSet.java:210)
at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:135)
at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:122)
at org.apache.maven.surefire.Surefire.run(Surefire.java:129)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:225)
at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:747)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.codehaus.janino.ScriptEvaluator.evaluate(Unknown Source)
at ch.qos.logback.core.boolex.JaninoEventEvaluatorBase.evaluate(JaninoEventEvaluatorBase.java:65)
... 40 more
Caused by: java.lang.NullPointerException
at SC.eval(ANONYMOUS.java:2)
... 46 more
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.036 sec
Running ch.qos.logback.classic.pattern.ConverterTest
java.lang.Exception: Bogus exception
java.lang.Exception: Bogus exception
Caller+0 at ch.qos.logback.classic.pattern.ConverterTest.testCallerData(ConverterTest.java:187)
Caller+1 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
Tests run: 14, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.13 sec
Running ch.qos.logback.classic.DynamicLoggerContextTest
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.654 sec
Running ch.qos.logback.classic.control.TestAction
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.004 sec
Running ch.qos.logback.classic.db.DBAppenderTest
[Server@68814013]: [Thread[main,5,main]]: checkRunning(false) entered
[Server@68814013]: [Thread[main,5,main]]: checkRunning(false) exited
[Server@68814013]: [Thread[main,5,main]]: setDatabaseName(0,test)
[Server@68814013]: [Thread[main,5,main]]: checkRunning(false) entered
[Server@68814013]: [Thread[main,5,main]]: checkRunning(false) exited
[Server@68814013]: [Thread[main,5,main]]: setDatabasePath(0,mem:test;sql.enforce_strict_size=true)
[Server@421fbfd6]: [Thread[main,5,main]]: checkRunning(false) entered
[Server@421fbfd6]: [Thread[main,5,main]]: checkRunning(false) exited
[Server@421fbfd6]: [Thread[main,5,main]]: setDatabaseName(0,test)
[Server@421fbfd6]: [Thread[main,5,main]]: checkRunning(false) entered
[Server@421fbfd6]: [Thread[main,5,main]]: checkRunning(false) exited
[Server@421fbfd6]: [Thread[main,5,main]]: setDatabasePath(0,mem:test;sql.enforce_strict_size=true)
[Server@6490832e]: [Thread[main,5,main]]: checkRunning(false) entered
[Server@6490832e]: [Thread[main,5,main]]: checkRunning(false) exited
[Server@6490832e]: [Thread[main,5,main]]: setDatabaseName(0,test)
[Server@6490832e]: [Thread[main,5,main]]: checkRunning(false) entered
[Server@6490832e]: [Thread[main,5,main]]: checkRunning(false) exited
[Server@6490832e]: [Thread[main,5,main]]: setDatabasePath(0,mem:test;sql.enforce_strict_size=true)
value: someValue
[Server@51b4a74b]: [Thread[main,5,main]]: checkRunning(false) entered
[Server@51b4a74b]: [Thread[main,5,main]]: checkRunning(false) exited
[Server@51b4a74b]: [Thread[main,5,main]]: setDatabaseName(0,test)
[Server@51b4a74b]: [Thread[main,5,main]]: checkRunning(false) entered
[Server@51b4a74b]: [Thread[main,5,main]]: checkRunning(false) exited
[Server@51b4a74b]: [Thread[main,5,main]]: setDatabasePath(0,mem:test;sql.enforce_strict_size=true)
Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.807 sec
Running ch.qos.logback.classic.util.InitializationTest
TEST 19:21:03.544 [main] DEBUG c.q.l.c.util.InitializationTest - Hello-didily-odily
TEST 19:21:03.546 [main] DEBUG c.q.l.c.util.InitializationTest - Hello-didily-odily
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.008 sec
Running ch.qos.logback.classic.LoggerPerfTest
Running on pixie
Average log time for disabled statements: 7.0 nanos.
Running on pixie
Average log time for disabled statements: 20.0 nanos.
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.626 sec
Running ch.qos.logback.classic.html.HTMLLayoutTest
Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.388 sec
Running ch.qos.logback.classic.control.RandomUtilTest
Resulting average is 5.01783
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.036 sec
Running ch.qos.logback.classic.net.SocketAppenderTest
Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.442 sec
Running ch.qos.logback.classic.net.SyslogAppenderTest
MockSyslogServer listening on port 14501
Waiting for message
Got message
MockSyslogServer listening on port 14502
Waiting for message
Got message
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.222 sec
Running ch.qos.logback.classic.control.ScenarioMakerTest
CreateLogger(ljggekfdysousqjomupjiohnoxq)
CreateLogger(bvifcmybxtrznamfkzlsiqmhofw)
CreateLogger(ogkozkyaunwfk.xwjjgisoszlqenwjinmb.uhhdwizvnotxhlyzjns.mhzsrnhrzjwcbjablolmlymhkwrelapoixghaacnxkidyoinstososm.rzbtjobjewalmeqyxblexlwqrwpchucbptqmfec)
SetLevel(INFO, ogkozkyaunwfk.xwjjgisoszlqenwjinmb.uhhdwizvnotxhlyzjns.mhzsrnhrzjwcbjablolmlymhkwrelapoixghaacnxkidyoinstososm.rzbtjobjewalmeqyxblexlwqrwpchucbptqmfec)
CreateLogger(ogkozkyaunwfk.xwjjgisoszlqenwjinmb.uhhdwizvnotxhlyzjns.mhzsrnhrzjwcbjablolmlymhkwrelapoixghaacnxkidyoinstososm.sconxzboswtpubzgjindmbwskxewvkshzpkistnlniocijaesypjwclzswiy)
SetLevel(DEBUG, ogkozkyaunwfk.xwjjgisoszlqenwjinmb.uhhdwizvnotxhlyzjns.mhzsrnhrzjwcbjablolmlymhkwrelapoixghaacnxkidyoinstososm.sconxzboswtpubzgjindmbwskxewvkshzpkistnlniocijaesypjwclzswiy)
CreateLogger(ogkozkyaunwfk.xwjjgisoszlqenwjinmb.uhhdwizvnotxhlyzjns.mhzsrnhrzjwcbjablolmlymhkwrelapoixghaacnxkidyoinstososm.rzeafvjxmvberuvmbyjxzospogus)
CreateLogger(ogkozkyaunwfk.xwjjgisoszlqenwjinmb.uhhdwizvnotxhlyzjns.mhzsrnhrzjwcbjablolmlymhkwrelapoixghaacnxkidyoinstososm.qxkpagyuzpvcltrpjvokzt)
CreateLogger(ogkozkyaunwfk.xwjjgisoszlqenwjinmb.uhhdwizvnotxhlyzjns.mhzsrnhrzjwcbjablolmlymhkwrelapoixghaacnxkidyoinstososm.jprxvqteaohafrmugfxbyvijkbyfbnos)
CreateLogger(ogkozkyaunwfk.xwjjgisoszlqenwjinmb.uhhdwizvnotxhlyzjns.njquybkyqphfcnulkqpwtbihgddbxqgmrxicelaonogjcxlitpryimdak.dgklnhbjmlrndpdnwsfjkrmhuyoxauvfhibjqtpt)
SetLevel(INFO, ogkozkyaunwfk.xwjjgisoszlqenwjinmb.uhhdwizvnotxhlyzjns.njquybkyqphfcnulkqpwtbihgddbxqgmrxicelaonogjcxlitpryimdak.dgklnhbjmlrndpdnwsfjkrmhuyoxauvfhibjqtpt)
CreateLogger(ogkozkyaunwfk.xwjjgisoszlqenwjinmb.uhhdwizvnotxhlyzjns.njquybkyqphfcnulkqpwtbihgddbxqgmrxicelaonogjcxlitpryimdak.bhstraisbrdcarvltibccjz)
CreateLogger(ogkozkyaunwfk.xwjjgisoszlqenwjinmb.uhhdwizvnotxhlyzjns.njquybkyqphfcnulkqpwtbihgddbxqgmrxicelaonogjcxlitpryimdak.rripvpurpstjpfzym)
CreateLogger(ogkozkyaunwfk.xwjjgisoszlqenwjinmb.uhhdwizvnotxhlyzjns.njquybkyqphfcnulkqpwtbihgddbxqgmrxicelaonogjcxlitpryimdak.ltckthuwgtraszksrfdcodspvbyyxgfolfltqhdfojmg)
CreateLogger(ogkozkyaunwfk.xwjjgisoszlqenwjinmb.uhhdwizvnotxhlyzjns.szgkwydrxisfhwtsdvraummfnhaytablthtypgqejfavo.xzbjclbwpoptlfiakyudsqtzgtozjlgbcbfszunisgexouuqlqsxs)
CreateLogger(ogkozkyaunwfk.xwjjgisoszlqenwjinmb.uhhdwizvnotxhlyzjns.szgkwydrxisfhwtsdvraummfnhaytablthtypgqejfavo.azcikomyelznxndbcxbvmkpwmscqt)
CreateLogger(ogkozkyaunwfk.xwjjgisoszlqenwjinmb.uhhdwizvnotxhlyzjns.szgkwydrxisfhwtsdvraummfnhaytablthtypgqejfavo.bjunncpxyawurawxkwjdwnclzhfxaaqrafpabrfjlse)
CreateLogger(ogkozkyaunwfk.xwjjgisoszlqenwjinmb.uhhdwizvnotxhlyzjns.szgkwydrxisfhwtsdvraummfnhaytablthtypgqejfavo.wew)
CreateLogger(ogkozkyaunwfk.xwjjgisoszlqenwjinmb.uhhdwizvnotxhlyzjns.szgkwydrxisfhwtsdvraummfnhaytablthtypgqejfavo.plpy)
CreateLogger(ogkozkyaunwfk.xwjjgisoszlqenwjinmb.uhhdwizvnotxhlyzjns.txoasruuwnggozsdqs.lyqiuiiovzrwujbuxzdnoidmhxtxqeepufkmyeaanwwsgt)
SetLevel(DEBUG, ogkozkyaunwfk.xwjjgisoszlqenwjinmb.uhhdwizvnotxhlyzjns.txoasruuwnggozsdqs.lyqiuiiovzrwujbuxzdnoidmhxtxqeepufkmyeaanwwsgt)
CreateLogger(ogkozkyaunwfk.xwjjgisoszlqenwjinmb.uhhdwizvnotxhlyzjns.txoasruuwnggozsdqs.dsncrzuhikbayfarjaxwppvccgildpgtepnlqeftnhrinzbkijoetxpirjiaiqysas)
SetLevel(DEBUG, ogkozkyaunwfk.xwjjgisoszlqenwjinmb.uhhdwizvnotxhlyzjns.txoasruuwnggozsdqs.dsncrzuhikbayfarjaxwppvccgildpgtepnlqeftnhrinzbkijoetxpirjiaiqysas)
CreateLogger(ogkozkyaunwfk.xwjjgisoszlqenwjinmb.uhhdwizvnotxhlyzjns.txoasruuwnggozsdqs.ofxljzobrludcnejulwxducplonrkqwqhlrfanxafyg)
CreateLogger(ogkozkyaunwfk.xwjjgisoszlqenwjinmb.uhhdwizvnotxhlyzjns.txoasruuwnggozsdqs.murkmlkvgkerioavjfrppltnddtpqvczne)
CreateLogger(ogkozkyaunwfk.xwjjgisoszlqenwjinmb.uhhdwizvnotxhlyzjns.ouhiltsaabrdybgsfkaaiafscevlllnzt.gnarpakghuhtcfmkhfbauzcbbtlq)
CreateLogger(ogkozkyaunwfk.xwjjgisoszlqenwjinmb.uhhdwizvnotxhlyzjns.ouhiltsaabrdybgsfkaaiafscevlllnzt.godcftqbrwkjdfrrioyzwmrmwpspvpztqbqqoulruyjkjbtndeenwonvcjnuczjegnxfjcsqehkn)
CreateLogger(ogkozkyaunwfk.xwjjgisoszlqenwjinmb.uhhdwizvnotxhlyzjns.ouhiltsaabrdybgsfkaaiafscevlllnzt.iwajobbvpsuuqvgjsk)
CreateLogger(ogkozkyaunwfk.xwjjgisoszlqenwjinmb.uhhdwizvnotxhlyzjns.ouhiltsaabrdybgsfkaaiafscevlllnzt.oyxsymrviydbmnelebbkvahofgbzxxrlpdkcxsypldjzosdbodjpuoljiohjdcw)
CreateLogger(ogkozkyaunwfk.xwjjgisoszlqenwjinmb.uhhdwizvnotxhlyzjns.ompilgezwcluzuffjdyxbaltrgfsfhxnxnwwkveuibkqiphq.ukdwyjklntgkvcdhzusmrj)
SetLevel(ERROR, ogkozkyaunwfk.xwjjgisoszlqenwjinmb.uhhdwizvnotxhlyzjns.ompilgezwcluzuffjdyxbaltrgfsfhxnxnwwkveuibkqiphq.ukdwyjklntgkvcdhzusmrj)
CreateLogger(ogkozkyaunwfk.xwjjgisoszlqenwjinmb.uhhdwizvnotxhlyzjns.t.g)
SetLevel(DEBUG, ogkozkyaunwfk.xwjjgisoszlqenwjinmb.uhhdwizvnotxhlyzjns.t.g)
CreateLogger(ogkozkyaunwfk.xwjjgisoszlqenwjinmb.uhhdwizvnotxhlyzjns.t.wexcnbkawjvfoeizazdxhlaqjuxb)
CreateLogger(ogkozkyaunwfk.xwjjgisoszlqenwjinmb.uhhdwizvnotxhlyzjns.t.xchowexpifwleubiymndxaxlxftetgp)
CreateLogger(ogkozkyaunwfk.xwjjgisoszlqenwjinmb.uhhdwizvnotxhlyzjns.t.bekqkxuuctmptezricsktevakkgpizcuitftrohmhpluhbzgaarqxljo)
CreateLogger(ogkozkyaunwfk.xwjjgisoszlqenwjinmb.uhhdwizvnotxhlyzjns.t.mxysyqbjuggrklmsjgvoajkyzjuurvtpztlajniok)
SetLevel(DEBUG, ogkozkyaunwfk.xwjjgisoszlqenwjinmb.uhhdwizvnotxhlyzjns.t.mxysyqbjuggrklmsjgvoajkyzjuurvtpztlajniok)
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.037 sec
Running ch.qos.logback.classic.joran.BasicJoranTest
|-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.appender.ListAppender]
|-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [LIST]
|-INFO in ch.qos.logback.core.joran.action.AppenderAction - Popping appender named [LIST] from the object stack
|-INFO in ch.qos.logback.classic.joran.action.LevelAction - root level set to DEBUG
|-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [LIST to Logger[root]
|-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - End of configuration.
|-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.appender.ListAppender]
|-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [LIST]
|-INFO in ch.qos.logback.core.joran.action.AppenderAction - Popping appender named [LIST] from the object stack
|-INFO in ch.qos.logback.classic.joran.action.LevelAction - ch.qos.logback.classic.joran level set to INFO
|-INFO in ch.qos.logback.classic.joran.action.LevelAction - root level set to DEBUG
|-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [LIST to Logger[root]
|-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - End of configuration.
LOGBACK: No context given for ch.qos.logback.core.joran.action.NestedSimplePropertyIA
|-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - Ignoring debug attribute.
|-WARN in ch.qos.logback.classic.joran.action.EvaluatorAction - Assuming default evaluator class [ch.qos.logback.classic.boolex.JaninoEventEvaluator]
|-INFO in ch.qos.logback.classic.joran.action.EvaluatorAction - Adding evaluator named [helloEval] to the object stack
|-INFO in ch.qos.logback.core.joran.action.MatcherAction - matcher named as [m]
|-INFO in ch.qos.logback.core.joran.action.MatcherAction - Popping appender named [m] from the object stack
|-INFO in ch.qos.logback.classic.joran.action.EvaluatorAction - Starting evaluator named [helloEval]
|-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.ConsoleAppender]
|-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [CONSOLE]
|-INFO in ch.qos.logback.core.joran.action.AppenderAction - Popping appender named [CONSOLE] from the object stack
|-INFO in ch.qos.logback.classic.joran.action.LevelAction - root level set to DEBUG
|-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [CONSOLE to Logger[root]
2006-11-10 19:21:05,329 DEBUG - toto
Caller+0 at ch.qos.logback.classic.joran.BasicJoranTest.testEval(BasicJoranTest.java:81)
Caller+1 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
Caller+2 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
Caller+3 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
2006-11-10 19:21:05,329 DEBUG - hello world
LOGBACK: No context given for ch.qos.logback.core.joran.action.NestedSimplePropertyIA
|-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - Ignoring debug attribute.
|-INFO in ch.qos.logback.core.joran.action.NestedComponentIA - was deemed applicable for [configuration][turboFilter]
|-INFO in ch.qos.logback.core.joran.action.NestedComponentIA - Pushing component <turboFilter> on top of the object stack.
|-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.ConsoleAppender]
|-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [CONSOLE]
|-INFO in ch.qos.logback.core.joran.action.AppenderAction - Popping appender named [CONSOLE] from the object stack
|-INFO in ch.qos.logback.classic.joran.action.LevelAction - root level set to DEBUG
|-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [CONSOLE to Logger[root]
LOGBACK: No context given for ch.qos.logback.core.joran.action.NestedSimplePropertyIA
|-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - Ignoring debug attribute.
|-INFO in ch.qos.logback.core.joran.action.NestedComponentIA - was deemed applicable for [configuration][turboFilter]
|-INFO in ch.qos.logback.core.joran.action.NestedComponentIA - Pushing component <turboFilter> on top of the object stack.
|-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.ConsoleAppender]
|-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [CONSOLE]
|-INFO in ch.qos.logback.core.joran.action.AppenderAction - Popping appender named [CONSOLE] from the object stack
|-INFO in ch.qos.logback.classic.joran.action.LevelAction - root level set to DEBUG
|-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [CONSOLE to Logger[root]
Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.046 sec
Results :
Tests run: 106, Failures: 1, Errors: 0, Skipped: 0
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] There are test failures.
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 14 seconds
[INFO] Finished at: Fri Nov 10 19:21:05 CET 2006
[INFO] Final Memory: 12M/147M
[INFO] ------------------------------------------------------------------------
****************************************************************************
1
0

svn commit: r896 - in logback/trunk: logback-classic/src/test/java/ch/qos/logback/classic logback-core/src/test/java/ch/qos/logback/core/pattern/parser
by noreply.seb@qos.ch 10 Nov '06
by noreply.seb@qos.ch 10 Nov '06
10 Nov '06
Author: seb
Date: Fri Nov 10 19:03:27 2006
New Revision: 896
Modified:
logback/trunk/logback-classic/src/test/java/ch/qos/logback/classic/PatternLayoutTest.java
logback/trunk/logback-core/src/test/java/ch/qos/logback/core/pattern/parser/AbstractPatternLayoutBaseTest.java
Log:
added a test method in PatternLayoutTest to test bug #29
Modified: logback/trunk/logback-classic/src/test/java/ch/qos/logback/classic/PatternLayoutTest.java
==============================================================================
--- logback/trunk/logback-classic/src/test/java/ch/qos/logback/classic/PatternLayoutTest.java (original)
+++ logback/trunk/logback-classic/src/test/java/ch/qos/logback/classic/PatternLayoutTest.java Fri Nov 10 19:03:27 2006
@@ -87,6 +87,18 @@
assertTrue(!val.contains("java.lang.Exception: Bogus exception"));
}
+ public void testWithParenthesis() {
+ PatternLayout pl = new PatternLayout();
+ pl.setPattern("(%msg:%msg) %msg");
+ Context context = new LoggerContext();
+ pl.setContext(context);
+ pl.start();
+ le = makeLoggingEvent(null);
+ String val = pl.doLayout(le);
+ //System.out.println("VAL == " + val);
+ assertEquals("(Some message:Some message) Some message", val);
+ }
+
public void testWithLettersComingFromLog4j() {
PatternLayout pl = new PatternLayout();
//Letters: p = level and c = logger
Modified: logback/trunk/logback-core/src/test/java/ch/qos/logback/core/pattern/parser/AbstractPatternLayoutBaseTest.java
==============================================================================
--- logback/trunk/logback-core/src/test/java/ch/qos/logback/core/pattern/parser/AbstractPatternLayoutBaseTest.java (original)
+++ logback/trunk/logback-core/src/test/java/ch/qos/logback/core/pattern/parser/AbstractPatternLayoutBaseTest.java Fri Nov 10 19:03:27 2006
@@ -51,7 +51,7 @@
plb.start();
String result = plb.doLayout(getEventObject());
assertFalse(result.contains("%PARSER_ERROR_EX"));
- System.out.println("========="+result);
+ //System.out.println("========="+result);
}
public void testStarted() {
@@ -65,7 +65,7 @@
}
public void testNullPattern() {
- System.out.println("testNullPattern");
+ //System.out.println("testNullPattern");
PatternLayoutBase plb = getPatternLayoutBase();
Context context = new ContextBase();
plb.setContext(context);
@@ -73,7 +73,7 @@
String s = plb.doLayout(getEventObject());
assertEquals("", s);
StatusChecker checker = new StatusChecker(context.getStatusManager());
- StatusPrinter.print(context.getStatusManager());
+ //StatusPrinter.print(context.getStatusManager());
assertTrue(checker.containsMatch("Failed to parse pattern \"null\""));
}
1
0