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
Online report : http://localhost:8090/continuum/servlet/continuum/target/ProjectBuild.vm/vi…
Build statistics:
State: Failed
Previous State: Failed
Started at: Wed, 8 Nov 2006 23:55:17 +0100
Finished at: Wed, 8 Nov 2006 23:55:20 +0100
Total time: 3s
Build Trigger: Forced
Exit code: 1
Building machine hostname: pixie
Operating system : Linux(unknown)
Java version : 1.5.0_08(Sun Microsystems Inc.)
Changes
No files changed
****************************************************************************
Output:
****************************************************************************
[INFO] Scanning for projects...
[INFO] ----------------------------------------------------------------------------
[INFO] Building Logback Examples Module
[INFO] task-segment: [clean, install]
[INFO] ----------------------------------------------------------------------------
[INFO] [clean:clean]
[INFO] Deleting directory /opt/continuum-1.0.3/apps/continuum/working-directory/50/target
[INFO] Deleting directory /opt/continuum-1.0.3/apps/continuum/working-directory/50/target/classes
[INFO] Deleting directory /opt/continuum-1.0.3/apps/continuum/working-directory/50/target/test-classes
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Failed to resolve artifact.
Missing:
----------
1) ch.qos.logback:logback-classic:jar:0.6-SNAPSHOT
Try downloading the file manually from the project website.
Then, install it using the command:
mvn install:install-file -DgroupId=ch.qos.logback -DartifactId=logback-classic \
-Dversion=0.6-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file
Path to dependency:
1) ch.qos.logback:logback-examples:jar:0.6-SNAPSHOT
2) ch.qos.logback:logback-classic:jar:0.6-SNAPSHOT
----------
1 required artifact is missing.
for artifact:
ch.qos.logback:logback-examples:jar:0.6-SNAPSHOT
from the specified remote repositories:
central (http://repo1.maven.org/maven2)
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2 seconds
[INFO] Finished at: Wed Nov 08 23:55:20 CET 2006
[INFO] Final Memory: 8M/83M
[INFO] ------------------------------------------------------------------------
****************************************************************************
1
0
Online report : http://localhost:8090/continuum/servlet/continuum/target/ProjectBuild.vm/vi…
Build statistics:
State: Failed
Previous State: Failed
Started at: Wed, 8 Nov 2006 23:55:01 +0100
Finished at: Wed, 8 Nov 2006 23:55:15 +0100
Total time: 13s
Build Trigger: Forced
Exit code: 1
Building machine hostname: pixie
Operating system : Linux(unknown)
Java version : 1.5.0_08(Sun Microsystems Inc.)
Changes
No files changed
****************************************************************************
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.097 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.022 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.012 sec
Running ch.qos.logback.classic.MDCTest
Exiting a
Exiting b
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.017 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
=========
testNullPattern
|-ERROR in ch.qos.logback.classic.PatternLayout(null) - Failed to parse pattern "null". ch.qos.logback.core.pattern.parser.ScanException: Failed to initialize Parser
ch.qos.logback.core.pattern.parser.ScanException: Failed to initialize Parser
at ch.qos.logback.core.pattern.parser.Parser.<init>(Parser.java:26)
at ch.qos.logback.core.pattern.PatternLayoutBase.start(PatternLayoutBase.java:73)
at ch.qos.logback.core.pattern.parser.AbstractPatternLayoutBaseTest.testNullPattern(AbstractPatternLayoutBaseTest.java:72)
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 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.NullPointerException: null pattern string not allowed
at ch.qos.logback.core.pattern.parser.TokenStream.<init>(TokenStream.java:50)
at ch.qos.logback.core.pattern.parser.Parser.<init>(Parser.java:23)
... 30 more
Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.019 sec
Running ch.qos.logback.classic.MessageFormattingTest
Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.015 sec
Running ch.qos.logback.classic.boolex.JaninoEventEvaluatorTest
INFO] Some message
INFO] Some message
timestamp > 10]: 5799 nanos
x.matches(message): 22678 nanos
Tests run: 11, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.508 sec
Running ch.qos.logback.classic.net.SMTPAppenderTest
Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.08 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-08 23:55:11,557 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-08 23:55:11,559 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@2c9b42e6 - 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.074 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.618 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@26858bf1]: [Thread[main,5,main]]: checkRunning(false) entered
[Server@26858bf1]: [Thread[main,5,main]]: checkRunning(false) exited
[Server@26858bf1]: [Thread[main,5,main]]: setDatabaseName(0,test)
[Server@26858bf1]: [Thread[main,5,main]]: checkRunning(false) entered
[Server@26858bf1]: [Thread[main,5,main]]: checkRunning(false) exited
[Server@26858bf1]: [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@4b947496]: [Thread[main,5,main]]: checkRunning(false) entered
[Server@4b947496]: [Thread[main,5,main]]: checkRunning(false) exited
[Server@4b947496]: [Thread[main,5,main]]: setDatabaseName(0,test)
[Server@4b947496]: [Thread[main,5,main]]: checkRunning(false) entered
[Server@4b947496]: [Thread[main,5,main]]: checkRunning(false) exited
[Server@4b947496]: [Thread[main,5,main]]: setDatabasePath(0,mem:test;sql.enforce_strict_size=true)
value: someValue
[Server@3e364641]: [Thread[main,5,main]]: checkRunning(false) entered
[Server@3e364641]: [Thread[main,5,main]]: checkRunning(false) exited
[Server@3e364641]: [Thread[main,5,main]]: setDatabaseName(0,test)
[Server@3e364641]: [Thread[main,5,main]]: checkRunning(false) entered
[Server@3e364641]: [Thread[main,5,main]]: checkRunning(false) exited
[Server@3e364641]: [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.855 sec
Running ch.qos.logback.classic.util.InitializationTest
TEST 23:55:13.197 [main] DEBUG c.q.l.c.util.InitializationTest - Hello-didily-odily
TEST 23:55:13.198 [main] DEBUG c.q.l.c.util.InitializationTest - Hello-didily-odily
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.007 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: 16.0 nanos.
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.56 sec
Running ch.qos.logback.classic.html.HTMLLayoutTest
Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.72 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.437 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
<23>Nov 08 11:55:15 pixie [main] ch.qos.logback.classic.net.SyslogAppenderTest hello java.lang.Exception: just testing
at ch.qos.logback.classic.net.SyslogAppenderTest.testExceptoin(SyslogAppenderTest.java:95)
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.GeneratedMethodAccessor5.invoke(Unknown Source)
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)
Tests run: 2, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.221 sec <<< FAILURE!
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.036 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-08 23:55:15,235 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-08 23:55:15,235 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.076 sec
Results :
Tests run: 105, 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: 12 seconds
[INFO] Finished at: Wed Nov 08 23:55:15 CET 2006
[INFO] Final Memory: 12M/147M
[INFO] ------------------------------------------------------------------------
****************************************************************************
1
0
Online report : http://localhost:8090/continuum/servlet/continuum/target/ProjectBuild.vm/vi…
Build statistics:
State: Ok
Previous State: Failed
Started at: Wed, 8 Nov 2006 23:54:48 +0100
Finished at: Wed, 8 Nov 2006 23:55:00 +0100
Total time: 11s
Build Trigger: Forced
Exit code: 0
Building machine hostname: pixie
Operating system : Linux(unknown)
Java version : 1.5.0_08(Sun Microsystems Inc.)
Changes
No files changed
****************************************************************************
Output:
****************************************************************************
[INFO] Scanning for projects...
[INFO] ----------------------------------------------------------------------------
[INFO] Building Logback Access Module
[INFO] task-segment: [clean, install]
[INFO] ----------------------------------------------------------------------------
[INFO] [clean:clean]
[INFO] Deleting directory /opt/continuum-1.0.3/apps/continuum/working-directory/47/target
[INFO] Deleting directory /opt/continuum-1.0.3/apps/continuum/working-directory/47/target/classes
[INFO] Deleting directory /opt/continuum-1.0.3/apps/continuum/working-directory/47/target/test-classes
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:compile]
Compiling 40 source files to /opt/continuum-1.0.3/apps/continuum/working-directory/47/target/classes
[INFO] [resources:testResources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:testCompile]
Compiling 9 source files to /opt/continuum-1.0.3/apps/continuum/working-directory/47/target/test-classes
[INFO] [surefire:test]
[INFO] Surefire report directory: /opt/continuum-1.0.3/apps/continuum/working-directory/47/target/surefire-reports
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running ch.qos.logback.access.jetty.JettyBasicTest
2006-11-08 23:54:58.471::INFO: Logging to STDERR via org.mortbay.log.StdErrLog
2006-11-08 23:54:58.543::INFO: jetty-6.0.x
2006-11-08 23:54:58.612::INFO: Started SelectChannelConnector @ 0.0.0.0:1234
08/11/2006:23:54:58 +0100 localhost 127.0.0.1
08/11/2006:23:54:58 +0100 localhost 127.0.0.1
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.293 sec
Running ch.qos.logback.access.pattern.ConverterTest
Tests run: 16, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.032 sec
Results :
Tests run: 18, Failures: 0, Errors: 0, Skipped: 0
[INFO] [jar:jar]
[INFO] Building jar: /opt/continuum-1.0.3/apps/continuum/working-directory/47/target/logback-access-0.6-SNAPSHOT.jar
[INFO] [install:install]
[INFO] Installing /opt/continuum-1.0.3/apps/continuum/working-directory/47/target/logback-access-0.6-SNAPSHOT.jar to /root/.m2/repository/ch/qos/logback/logback-access/0.6-SNAPSHOT/logback-access-0.6-SNAPSHOT.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 9 seconds
[INFO] Finished at: Wed Nov 08 23:55:00 CET 2006
[INFO] Final Memory: 12M/116M
[INFO] ------------------------------------------------------------------------
****************************************************************************
1
0
Author: ceki
Date: Wed Nov 8 23:34:02 2006
New Revision: 887
Modified:
logback/trunk/pom.xml
Log:
updated continous integration info..
Modified: logback/trunk/pom.xml
==============================================================================
--- logback/trunk/pom.xml (original)
+++ logback/trunk/pom.xml Wed Nov 8 23:34:02 2006
@@ -224,6 +224,18 @@
<url>http://svn.qos.ch/viewvc/logback/</url>
</scm>
+ <ciManagement>
+ <system>continuum</system>
+ <notifiers>
+ <notifier>
+ <type>mail</type>
+ <configuration>
+ <address>logback-dev(a)qos.ch</address>
+ </configuration>
+ </notifier>
+ </notifiers>
+ </ciManagement>
+
<distributionManagement>
<site>
<id>pixie</id>
1
0
Author: ceki
Date: Wed Nov 8 23:22:47 2006
New Revision: 886
Modified:
logback/trunk/pom.xml
Log:
Updated SCM information (starting to use Continuum)
Modified: logback/trunk/pom.xml
==============================================================================
--- logback/trunk/pom.xml (original)
+++ logback/trunk/pom.xml Wed Nov 8 23:22:47 2006
@@ -107,7 +107,6 @@
</dependencyManagement>
<build>
-
<extensions>
<extension>
<groupId>org.apache.maven.wagon</groupId>
@@ -218,21 +217,21 @@
</plugins>
</reporting>
-
+
<scm>
- <connection>http://svn.qos.ch/repos/logback/</connection>
- <developerConnection>scm:svn:https://svn.qos.ch/repos/logback/</developerConnection>
+ <connection>scm:svn:http://svn.qos.ch/repos/logback/trunk</connection>
+ <developerConnection>scm:svn:https://svn.qos.ch/repos/logback/trunk</developerConnection>
<url>http://svn.qos.ch/viewvc/logback/</url>
</scm>
- <distributionManagement>
- <site>
- <id>pixie</id>
- <url>scp://pixie/var/www/logback.qos.ch/htdocs/</url>
- </site>
- <repository>
- <id>pixie</id>
- <url>scp://pixie/var/www/logback.qos.ch/htdocs/dist/</url>
- </repository>
- </distributionManagement>
+ <distributionManagement>
+ <site>
+ <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>
+ </distributionManagement>
</project>
\ No newline at end of file
1
0

svn commit: r885 - in logback/trunk: logback-classic/src/main/java/ch/qos/logback/classic/net logback-examples/src/main/java/chapter4/conf logback-examples/src/main/java/chapter4/db logback-site/src/site/xdocTemplates/manual
by noreply.seb@qos.ch 08 Nov '06
by noreply.seb@qos.ch 08 Nov '06
08 Nov '06
Author: seb
Date: Wed Nov 8 15:41:08 2006
New Revision: 885
Added:
logback/trunk/logback-examples/src/main/java/chapter4/conf/logback-syslog.xml
Modified:
logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/net/SyslogAppender.java
logback/trunk/logback-examples/src/main/java/chapter4/conf/logback-Console.xml
logback/trunk/logback-examples/src/main/java/chapter4/conf/logback-HtmlToConsole.xml
logback/trunk/logback-examples/src/main/java/chapter4/conf/logback-MDC.xml
logback/trunk/logback-examples/src/main/java/chapter4/conf/logback-SMTP.xml
logback/trunk/logback-examples/src/main/java/chapter4/conf/logback-SMTPWithHtml.xml
logback/trunk/logback-examples/src/main/java/chapter4/db/append-with-c3p0.xml
logback/trunk/logback-examples/src/main/java/chapter4/db/append-with-pooled-datasource.xml
logback/trunk/logback-site/src/site/xdocTemplates/manual/appenders.xml
Log:
On going work on chapter 4
- Modified sample configs
- Added begin of SyslogAppender doc
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 Wed Nov 8 15:41:08 2006
@@ -24,7 +24,7 @@
String prefixPattern;
- static final public String DEFAULT_SUFFIX_PATTERN = "[%thread] %logger %m%exception";
+ static final public String DEFAULT_SUFFIX_PATTERN = "[%thread] %logger %msg %exception";
public Layout buildLayout(String facilityStr) {
Modified: logback/trunk/logback-examples/src/main/java/chapter4/conf/logback-Console.xml
==============================================================================
--- logback/trunk/logback-examples/src/main/java/chapter4/conf/logback-Console.xml (original)
+++ logback/trunk/logback-examples/src/main/java/chapter4/conf/logback-Console.xml Wed Nov 8 15:41:08 2006
@@ -3,8 +3,7 @@
<appender name="STDOUT"
class="ch.qos.logback.core.ConsoleAppender">
<layout class="ch.qos.logback.classic.PatternLayout">
- <param name="Pattern"
- value="%-4relative [%thread] %-5level - %msg %n" />
+ <Pattern>%-4relative [%thread] %-5level - %msg %n</Pattern>
</layout>
</appender>
Modified: logback/trunk/logback-examples/src/main/java/chapter4/conf/logback-HtmlToConsole.xml
==============================================================================
--- logback/trunk/logback-examples/src/main/java/chapter4/conf/logback-HtmlToConsole.xml (original)
+++ logback/trunk/logback-examples/src/main/java/chapter4/conf/logback-HtmlToConsole.xml Wed Nov 8 15:41:08 2006
@@ -4,10 +4,9 @@
class="ch.qos.logback.core.ConsoleAppender">
<layout class="ch.qos.logback.classic.html.HTMLLayout">
<cssBuilder class="ch.qos.logback.core.helpers.CssBuilder">
- <param name="url" value="path_to_StyleFile.css" />
+ <url>path_to_StyleFile.css</url>
</cssBuilder>
- <param name="Pattern"
- value="%-4relative [%thread] %-5level - %msg%n" />
+ <Pattern>%-4relative [%thread] %-5level - %msg%n</Pattern>
</layout>
</appender>
Modified: logback/trunk/logback-examples/src/main/java/chapter4/conf/logback-MDC.xml
==============================================================================
--- logback/trunk/logback-examples/src/main/java/chapter4/conf/logback-MDC.xml (original)
+++ logback/trunk/logback-examples/src/main/java/chapter4/conf/logback-MDC.xml Wed Nov 8 15:41:08 2006
@@ -3,8 +3,7 @@
<appender name="STDOUT"
class="ch.qos.logback.core.ConsoleAppender">
<layout class="ch.qos.logback.classic.PatternLayout">
- <param name="Pattern"
- value="%-4relative [%thread] %-5level %X{testKey} - %msg%n" />
+ <Pattern>%-4relative [%thread] %-5level %X{testKey} - %msg%n</Pattern>
</layout>
</appender>
Modified: logback/trunk/logback-examples/src/main/java/chapter4/conf/logback-SMTP.xml
==============================================================================
--- logback/trunk/logback-examples/src/main/java/chapter4/conf/logback-SMTP.xml (original)
+++ logback/trunk/logback-examples/src/main/java/chapter4/conf/logback-SMTP.xml Wed Nov 8 15:41:08 2006
@@ -3,15 +3,14 @@
<appender name="SMTP"
class="ch.qos.logback.classic.net.SMTPAppender">
<layout class="ch.qos.logback.classic.PatternLayout">
- <param name="pattern"
- value="%-4relative [%thread] %-5level %class - %msg%n" />
+ <Pattern>%-4relative [%thread] %-5level %class - %msg%n</Pattern>
</layout>
- <param name="From" value="test.nospam(a)qos.ch" />
- <param name="SMTPHost" value="mail.qos.ch" />
+ <From>sender_email(a)host.ch</From>
+ <SMTPHost>mail.host.ch</SMTPHost>
- <param name="Subject" value="Last Event: %-10logger %nopex" />
+ <Subject>Last Event: %-10logger %nopex</Subject>
- <param name="To" value="sebastien(a)qos.ch" />
+ <To>recipient_email(a)host.ch</To>
</appender>
<root>
Modified: logback/trunk/logback-examples/src/main/java/chapter4/conf/logback-SMTPWithHtml.xml
==============================================================================
--- logback/trunk/logback-examples/src/main/java/chapter4/conf/logback-SMTPWithHtml.xml (original)
+++ logback/trunk/logback-examples/src/main/java/chapter4/conf/logback-SMTPWithHtml.xml Wed Nov 8 15:41:08 2006
@@ -3,14 +3,15 @@
<appender name="SMTP"
class="ch.qos.logback.classic.net.SMTPAppender">
<layout class="ch.qos.logback.classic.html.HTMLLayout">
- <param name="pattern" value="%relative%thread%mdc%level%class%msg" />
+ <pattern>%relative%thread%mdc%level%class%msg</pattern>
<throwableRenderer class="ch.qos.logback.classic.html.DefaultThrowableRenderer" />
</layout>
- <param name="From" value="test.nospam(a)qos.ch" />
- <param name="SMTPHost" value="mail.qos.ch" />
- <param name="Subject" value="LastEvent: %class - %msg %nopex" />
+ <From>sender_email(a)host.ch</From>
+ <SMTPHost>mail.host.ch</SMTPHost>
- <param name="To" value="sebastien(a)qos.ch" />
+ <Subject>Last Event: %-10logger %nopex</Subject>
+
+ <To>recipient_email(a)host.ch</To>
</appender>
<root>
Added: logback/trunk/logback-examples/src/main/java/chapter4/conf/logback-syslog.xml
==============================================================================
--- (empty file)
+++ logback/trunk/logback-examples/src/main/java/chapter4/conf/logback-syslog.xml Wed Nov 8 15:41:08 2006
@@ -0,0 +1,15 @@
+<configuration>
+
+ <appender name="STDOUT"
+ class="ch.qos.logback.classic.net.SyslogAppender">
+ <SyslogHost>pixie</SyslogHost>
+ <Facility>AUTH</Facility>
+ <SuffixPattern>%-4relative [%thread] %-5level - %msg %n</SuffixPattern>
+ </appender>
+
+ <root>
+ <level value="debug" />
+ <appender-ref ref="STDOUT" />
+ </root>
+</configuration>
+
Modified: logback/trunk/logback-examples/src/main/java/chapter4/db/append-with-c3p0.xml
==============================================================================
--- logback/trunk/logback-examples/src/main/java/chapter4/db/append-with-c3p0.xml (original)
+++ logback/trunk/logback-examples/src/main/java/chapter4/db/append-with-c3p0.xml Wed Nov 8 15:41:08 2006
@@ -20,9 +20,7 @@
<param name="inactivity-timeout" value="200"/>
-->
</dataSource>
-
- <user>${user}</user>
- <password>${password}</password>
+
</connectionSource>
</appender>
Modified: logback/trunk/logback-examples/src/main/java/chapter4/db/append-with-pooled-datasource.xml
==============================================================================
--- logback/trunk/logback-examples/src/main/java/chapter4/db/append-with-pooled-datasource.xml (original)
+++ logback/trunk/logback-examples/src/main/java/chapter4/db/append-with-pooled-datasource.xml Wed Nov 8 15:41:08 2006
@@ -19,9 +19,7 @@
<initialConnections>10</initialConnections>
<maxConnections>10</maxConnections>
</dataSource>
-
- <user>${user}</user>
- <password>${password}</password>
+
</connectionSource>
</appender>
Modified: logback/trunk/logback-site/src/site/xdocTemplates/manual/appenders.xml
==============================================================================
--- logback/trunk/logback-site/src/site/xdocTemplates/manual/appenders.xml (original)
+++ logback/trunk/logback-site/src/site/xdocTemplates/manual/appenders.xml Wed Nov 8 15:41:08 2006
@@ -2082,9 +2082,109 @@
<h3>SyslogAppender</h3>
<p>
-
+ The syslog protocol is a very simple protocol: a syslog sender sends a small
+ message to a syslog receiver.
+ The receiver is commonly called <em>syslog daemon</em> or <em>syslog server</em>.
+ Logback can send messages to a remote syslog daemon. This is achieved by using
+ <a href="../xref/ch/qos/logback/classic/net/SyslogAppender.html"><code>SyslogAppender</code></a>.
+ </p>
+
+ <p>
+ Here are its options:
</p>
+ <table>
+ <tr>
+ <th>Option Name</th>
+ <th>Type</th>
+ <th>Description</th>
+ </tr>
+ <tr>
+ <td>
+ <b>
+ <span class="option">SyslogHost</span>
+ </b>
+ </td>
+ <td>
+ <code>String</code>
+ </td>
+ <td>
+ The host name of the syslog server.
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <b>
+ <span class="option">Port</span>
+ </b>
+ </td>
+ <td>
+ <code>String</code>
+ </td>
+ <td>
+ The port number on the syslog server to connect to. Nornally, one would not want
+ to change the default value, that is <em>514</em>.
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <b>
+ <span class="option">Facility</span>
+ </b>
+ </td>
+ <td>
+ <code>String</code>
+ </td>
+ <td>
+ <p>
+ The <span class="option">Facility</span> is meant to identify
+ the source of a message.
+ </p>
+ <p>
+ The <span class="option">Facility</span> option must be set one
+ of the strings <em>KERN, USER, MAIL, DAEMON, AUTH, SYSLOG, LPR, NEWS, UUCP,
+ CRON, AUTHPRIV, FTP, NTP, AUDIT, ALERT, CLOCK, LOCAL0, LOCAL1, LOCAL2,
+ LOCAL3, LOCAL4, LOCAL5, LOCAL6, LOCAL7</em>. Case is not important.
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <b>
+ <span class="option">SuffixPattern</span>
+ </b>
+ </td>
+ <td>
+ <code>String</code>
+ </td>
+ <td>
+ <p>
+ The <span class="option">SuffixPattern</span> option specifies the format of the
+ non-standardized part the message sent to the syslog server. By default, its value
+ is <em>[%thread] %logger %msg %exception</em>. Any value that a <code>PatternLayout</code>
+ could use is a correct <span class="option">SuffixPattern</span>.
+ </p>
+ </td>
+ </tr>
+ </table>
+
+ <p>
+ The syslog severity of a logging event is converted from the level of the logging event.
+ The <em>DEBUG</em> level is converted to <em>7</em>, <em>INFO</em> is converted to
+ <em>6</em>, <em>WARN</em> is converted to <em>4</em> and <em>ERROR</em> is converted
+ to <em>3</em>.
+ </p>
+
+ <p>
+ Since the format of a syslog request follows rather strict rules,
+ </p>
+
+
+
+
+
+
+
<h2>Logback Access</h2>
<h3>SMTPAppender</h3>
1
0

svn commit: r884 - logback/trunk/logback-site/src/site/xdocTemplates/manual
by noreply.seb@qos.ch 08 Nov '06
by noreply.seb@qos.ch 08 Nov '06
08 Nov '06
Author: seb
Date: Wed Nov 8 11:26:40 2006
New Revision: 884
Modified:
logback/trunk/logback-site/src/site/xdocTemplates/manual/appenders.xml
Log:
on going work
Modified: logback/trunk/logback-site/src/site/xdocTemplates/manual/appenders.xml
==============================================================================
--- logback/trunk/logback-site/src/site/xdocTemplates/manual/appenders.xml (original)
+++ logback/trunk/logback-site/src/site/xdocTemplates/manual/appenders.xml Wed Nov 8 11:26:40 2006
@@ -1678,7 +1678,7 @@
</p>
<p>
- The table below summarizes the database tapes and their support of the
+ The table below summarizes the database types and their support of the
<code>getGeneratedKeys()</code> method.
</p>
@@ -1740,82 +1740,13 @@
<p>
Configuring logback to use <code>DBAppender</code> can be done
in several different ways, depending on the tools one has to
- connect to the database, and the database itself.
+ connect to the database, and the database itself. All manners of
+ configuring <code>DBAppender</code> are about setting its
+ <code>ConnectionSource</code> object, which we will cover in
+ a short moment.
</p>
<p>
- The first example that we will review is a configuration using
- <code>DriverManagerConnectionSource</code> and a MySQL database.
- The following configuration file is what one would need.
- </p>
-
-<em>Example 4.6: <code>DBAppender</code> configuration (logback-examples/src/main/java/chapter4/db/append-toMySQL-with-driverManager.xml)</em>
-<div class="source"><pre><configuration>
-
- <b><appender name="DB" class="ch.qos.logback.classic.db.DBAppender">
- <connectionSource class="ch.qos.logback.core.db.DriverManagerConnectionSource">
- <driverClass>com.mysql.jdbc.Driver</driverClass>
- <url>jdbc:mysql://host_name:3306/datebase_name</url>
- <user>username</user>
- <password>password</password>
- </connectionSource>
- </appender></b>
-
- <!-- Prevent internal logback DEBUG messages from polluting the output. -->
- <logger name="ch.qos.logback.core.joran"><level value="INFO" /></logger>
- <logger name="ch.qos.logback.classic.joran"><level value="INFO" /></logger>
-
- <root>
- <level value="debug" />
- <appender-ref ref="DB" />
- </root>
-</configuration></pre></div>
-
- <p>
- The correct driver must be declared. Here, the <code>com.mysql.jdbc.Driver</code>
- class is used. The <span class="option">url</span> must begin with <em>jdbc:myslq://</em>.
- </p>
-
- <p>Connecting to a database using a <code>DataSource</code> is rather similar:</p>
-
-<em>Example 4.7: <code>DBAppender</code> configuration (logback-examples/src/main/java/chapter4/db/append-with-datasource.xml)</em>
-<div class="source"><pre><configuration>
-
- <appender name="DB" class="ch.qos.logback.classic.db.DBAppender">
- <b><connectionSource class="ch.qos.logback.core.db.DataSourceConnectionSource">
-
- <dataSource class="${dataSourceClass}">
- </b><!-- Joran cannot substitute variables
- that are not attribute values. Therefore, we cannot
- declare the next parameter like the others.
- -->
- <b><param name="${url-key:-url}" value="${url_value}"/>
- <serverName>${serverName}</serverName>
- <databaseName>${databaseName}</databaseName>
- </dataSource></b>
-
- <user>${user}</user>
- <password>${password}</password>
- </connectionSource>
- </appender>
-
- <!-- Prevent internal logback DEBUG messages from polluting the output. -->
- <logger name="ch.qos.logback.core.joran"><level value="INFO" /></logger>
- <logger name="ch.qos.logback.classic.joran"><level value="INFO" /></logger>
-
- <root>
- <level value ="debug"/>
- <appender-ref ref="DB" />
- </root>
-</configuration></pre></div>
-
- <p>
- Not that in this configuration sample, we make heavy use of substitution variables.
- They are sometimes handy when connection details have to be centralised in a
- single configuration file and shared by logback and other frameworks.
- </p>
-
- <p>
Once logback is configured properly, the logging events are sent to
the specified database. As stated previously, there are three tables
used by logback to store logging event data.
@@ -1970,8 +1901,189 @@
<img src="images/chapter4/dbAppenderLEProperty.gif" alt="Logging Event Property table" />
+
+ <h4>ConnectionSource</h4>
+
+ <p>
+ The <id>ConnectionSource</id> interface provides a pluggable means of
+ transparently obtaining JDBC Connections for logback classes that
+ require the use of a <code>java.sql.Connection</code>. There are currently
+ three implementations of <code>ConnectionSource</code>, namely
+ <code>DataSourceConnectionSource</code>, <code>DriverManagerConnectionSource</code>
+ and <code>JNDIConnectionSource</code>.
+ </p>
+
+ <p>
+ The first example that we will review is a configuration using
+ <code>DriverManagerConnectionSource</code> and a MySQL database.
+ The following configuration file is what one would need.
+ </p>
+
+<em>Example 4.6: <code>DBAppender</code> configuration (logback-examples/src/main/java/chapter4/db/append-toMySQL-with-driverManager.xml)</em>
+<div class="source"><pre><configuration>
+
+ <b><appender name="DB" class="ch.qos.logback.classic.db.DBAppender">
+ <connectionSource class="ch.qos.logback.core.db.DriverManagerConnectionSource">
+ <driverClass>com.mysql.jdbc.Driver</driverClass>
+ <url>jdbc:mysql://host_name:3306/datebase_name</url>
+ <user>username</user>
+ <password>password</password>
+ </connectionSource>
+ </appender></b>
+
+ <!-- Prevent internal logback DEBUG messages from polluting the output. -->
+ <logger name="ch.qos.logback.core.joran"><level value="INFO" /></logger>
+ <logger name="ch.qos.logback.classic.joran"><level value="INFO" /></logger>
+
+ <root>
+ <level value="debug" />
+ <appender-ref ref="DB" />
+ </root>
+</configuration></pre></div>
+
+ <p>
+ The correct driver must be declared. Here, the <code>com.mysql.jdbc.Driver</code>
+ class is used. The <span class="option">url</span> must begin with <em>jdbc:myslq://</em>.
+ </p>
+
+ <p>
+ The
+ <a href="../xref/ch/qos/logback/core/db/DriverManagerConnectionSource.html">
+ <code>DriverManagerConnectionSource</code></a> is an implementation of
+ <code>ConnectionSource</code> that obtains the connection in the
+ traditional JDBC manner based on the connection URL.
+ </p>
+ <p>
+ Note that this class will establish a new <code>Connection</code> for
+ each call to <code>getConnection()</code>. It is recommended
+ that you either use a JDBC driver that natively supports
+ connection pooling or that you create your own
+ implementation of <code>ConnectionSource</code> that taps into
+ whatever pooling mechanism you are already using. (If you
+ have access to a JNDI implementation that supports
+ <code>javax.sql.DataSource</code>, e.g. within a J2EE application
+ server, see <code>JNDIConnectionSource</code>).
+ </p>
+
+ <p>
+ If you do not have another connection pooling mechanism built
+ into your application, you can use the
+ <a href="http://jakarta.apache.org/commons/dbcp/index.html">
+ commons-dbcp </a> package from Apache:
+ </p>
+
+<div class="source"><pre>
+ <connectionSource
+ class="ch.qos.logback.core.db.DriverManagerConnectionSource">
+ <param name="driver" value="org.apache.commons.dbcp.PoolingDriver"/>
+ <param name="url" value="jdbc:apache:commons:dbcp:/myPoolingDriver"/>
+ </connectionSource>
+</pre></div>
+
+ <p>
+ Then the configuration information for the commons-dbcp
+ package goes into the file <em>myPoolingDriver.jocl</em> and is
+ placed in the classpath. See the
+ <a href="http://jakarta.apache.org/commons/dbcp/index.html"> commons-dbcp </a>
+ documentation for details.
+ </p>
+
+ <p>
+ Connecting to a database using a <code>DataSource</code> is rather similar.
+ The configuration now uses
+ <a href="../xref/ch/qos/logback/core/db/DataSourceConnectionSource.html">
+ <code>DataSourceConnectionSource</code></a>,
+ which is an implementation of <code>ConnectionSource</code> that obtains the
+ <code>Connection</code> in the recommended JDBC manner based on a
+ <code>javax.sql.DataSource</code>.
+ </p>
+
+<em>Example 4.7: <code>DBAppender</code> configuration (logback-examples/src/main/java/chapter4/db/append-with-datasource.xml)</em>
+<div class="source"><pre><configuration>
+
+ <appender name="DB" class="ch.qos.logback.classic.db.DBAppender">
+ <b><connectionSource class="ch.qos.logback.core.db.DataSourceConnectionSource">
+
+ <dataSource class="${dataSourceClass}">
+ </b><!-- Joran cannot substitute variables
+ that are not attribute values. Therefore, we cannot
+ declare the next parameter like the others.
+ -->
+ <b><param name="${url-key:-url}" value="${url_value}"/>
+ <serverName>${serverName}</serverName>
+ <databaseName>${databaseName}</databaseName>
+ </dataSource></b>
+
+ <user>${user}</user>
+ <password>${password}</password>
+ </connectionSource>
+ </appender>
+
+ <!-- Prevent internal logback DEBUG messages from polluting the output. -->
+ <logger name="ch.qos.logback.core.joran"><level value="INFO" /></logger>
+ <logger name="ch.qos.logback.classic.joran"><level value="INFO" /></logger>
+
+ <root>
+ <level value ="debug"/>
+ <appender-ref ref="DB" />
+ </root>
+</configuration></pre></div>
+
+ <p>
+ Not that in this configuration sample, we make heavy use of substitution variables.
+ They are sometimes handy when connection details have to be centralised in a
+ single configuration file and shared by logback and other frameworks.
+ </p>
+
+ <p>
+ The third implementation of <code>ConnectionSource</code> that is shipped with
+ logback is the <code>JNDIConnectionSource</code>.
+ </p>
+
+ <p>
+ The
+ <a href="../xref/ch/qos/logback/core/db/JNDIConnectionSource.html">
+ <code>JNDIConnectionSource</code></a>
+ is an implementation of <code>ConnectionSource</code> that
+ obtains a <code>javax.sql.DataSource</code> from a JNDI provider
+ and uses it to obtain a <code>java.sql.Connection</code>. It is
+ primarily designed to be used inside of J2EE application
+ servers or application server clients, assuming the
+ application server supports remote access of <code>javax.sql.DataSource</code>.
+ In this way one can take advantage of connection pooling and whatever other goodies the
+ application server provides.
+ </p>
+
+<div class="source"><pre>
+<connectionSource class="ch.qos.logback.core.db.JNDIConnectionSource">
+ <param name="jndiLocation" value="jdbc/MySQLDS" />
+ <param name="username" value="myUser" />
+ <param name="password" value="myPassword" />
+</connectionSource>
+ </pre></div>
+
+ <p>
+ Note that this class will obtain an
+ <code>javax.naming.InitialContext</code>
+ using the no-argument constructor. This will usually work
+ when executing within a J2EE environment. When outside the
+ J2EE environment, make sure that you provide a
+ <em>jndi.properties</em>
+ file as described by your JNDI provider's documentation.
+ </p>
+
+
+ <p>
+ <b>MORE INFO TO ADD HERE JNDI + BindAction + DataSourceCS? Or directly
+ with JNDICS??</b>
+ </p>
+
<h3>SyslogAppender</h3>
+
+ <p>
+
+ </p>
<h2>Logback Access</h2>
1
0

svn commit: r883 - in logback/trunk: logback-core/src/main/java/ch/qos/logback/core/db logback-examples/src/main/java/chapter4/db logback-site/src/site logback-site/src/site/resources/manual/images/chapter4 logback-site/src/site/xdocTemplates/manual
by noreply.seb@qos.ch 08 Nov '06
by noreply.seb@qos.ch 08 Nov '06
08 Nov '06
Author: seb
Date: Wed Nov 8 10:06:07 2006
New Revision: 883
Added:
logback/trunk/logback-site/src/site/resources/manual/images/chapter4/
logback/trunk/logback-site/src/site/resources/manual/images/chapter4/dbAppenderLE.gif (contents, props changed)
logback/trunk/logback-site/src/site/resources/manual/images/chapter4/dbAppenderLEException.gif (contents, props changed)
logback/trunk/logback-site/src/site/resources/manual/images/chapter4/dbAppenderLEProperty.gif (contents, props changed)
Modified:
logback/trunk/logback-core/src/main/java/ch/qos/logback/core/db/DataSourceConnectionSource.java
logback/trunk/logback-examples/src/main/java/chapter4/db/append-toMySQL-with-driverManager.xml
logback/trunk/logback-examples/src/main/java/chapter4/db/append-with-datasource.xml
logback/trunk/logback-examples/src/main/java/chapter4/db/append-with-drivermanager.xml
logback/trunk/logback-examples/src/main/java/chapter4/db/append-with-jndi.xml
logback/trunk/logback-examples/src/main/java/chapter4/db/append-with-pooled-datasource.xml
logback/trunk/logback-site/src/site/ (props changed)
logback/trunk/logback-site/src/site/site.xml
logback/trunk/logback-site/src/site/xdocTemplates/manual/appenders.xml
Log:
On Work in progress on chapter 4
- DBAppender documentation
- configuration examples
- minor tweaks to site aesthetics
- added illustrations for dbAppender
- modified .svnignore on src/site
Modified: logback/trunk/logback-core/src/main/java/ch/qos/logback/core/db/DataSourceConnectionSource.java
==============================================================================
--- logback/trunk/logback-core/src/main/java/ch/qos/logback/core/db/DataSourceConnectionSource.java (original)
+++ logback/trunk/logback-core/src/main/java/ch/qos/logback/core/db/DataSourceConnectionSource.java Wed Nov 8 10:06:07 2006
@@ -10,21 +10,19 @@
package ch.qos.logback.core.db;
-
import java.sql.Connection;
import java.sql.SQLException;
import javax.sql.DataSource;
-
/**
- * The DataSourceConnectionSource is an implementation of {@link ConnectionSource}
- * that obtains the Connection in the recommended JDBC manner based on
- * a {@link javax.sql.DataSource DataSource}.
- * <p>
- *
- * @author Ray DeCampo
- * @author Ceki Gülcü
+ * The DataSourceConnectionSource is an implementation of
+ * {@link ConnectionSource} that obtains the Connection in the recommended JDBC
+ * manner based on a {@link javax.sql.DataSource DataSource}.
+ * <p>
+ *
+ * @author Ray DeCampo
+ * @author Ceki Gülcü
*/
public class DataSourceConnectionSource extends ConnectionSourceBase {
@@ -32,20 +30,21 @@
@Override
public void start() {
- //LogLog.debug("**********DataSourceConnectionSource.activateOptions called");
if (dataSource == null) {
addWarn("WARNING: No data source specified");
} else {
Connection connection = null;
try {
connection = getConnection();
- } catch(SQLException se) {
- addWarn("Could not get a connection to discover the dialect to use.", se);
+ } catch (SQLException se) {
+ addWarn("Could not get a connection to discover the dialect to use.",
+ se);
}
- if(connection != null) {
+ if (connection != null) {
discoverConnnectionProperties();
- }
- if(!supportsGetGeneratedKeys() && getSQLDialectCode() == ConnectionSource.UNKNOWN_DIALECT) {
+ }
+ if (!supportsGetGeneratedKeys()
+ && getSQLDialectCode() == ConnectionSource.UNKNOWN_DIALECT) {
addWarn("Connection does not support GetGeneratedKey method and could not discover the dialect.");
}
}
Modified: logback/trunk/logback-examples/src/main/java/chapter4/db/append-toMySQL-with-driverManager.xml
==============================================================================
--- logback/trunk/logback-examples/src/main/java/chapter4/db/append-toMySQL-with-driverManager.xml (original)
+++ logback/trunk/logback-examples/src/main/java/chapter4/db/append-toMySQL-with-driverManager.xml Wed Nov 8 10:06:07 2006
@@ -1,23 +1,22 @@
-<configuration>
-
- <appender name="DB" class="ch.qos.logback.classic.db.DBAppender">
- <connectionSource class="ch.qos.logback.classic.db.DriverManagerConnectionSource">
- <driverClass>"com.mysql.jdbc.Driver</driverClass>
- <url>jdbc:mysql://host_name:3306/datebase_name</url>
- <user>logback</user>
- <password>logback</password>
- </connectionSource>
- </appender>
+<?xml version="1.0" encoding="UTF-8" ?>
+<configuration>
- <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
- <layout class="ch.qos.logback.classic.PatternLayout">
- <pattern>%level %thread %logger - %msg%n</pattern>
- </layout>
- </appender>
- <root>
- <level value="debug"/>
- <appender-ref ref="STDOUT"/>
- <appender-ref ref="DB"/>
- </root>
+ <appender name="DB" class="ch.qos.logback.classic.db.DBAppender">
+ <connectionSource class="ch.qos.logback.core.db.DriverManagerConnectionSource">
+ <driverClass>com.mysql.jdbc.Driver</driverClass>
+ <url>jdbc:mysql://host_name:3306/datebase_name</url>
+ <user>username</user>
+ <password>password</password>
+ </connectionSource>
+ </appender>
+
+ <!-- Prevent internal logback DEBUG messages from polluting the output. -->
+ <logger name="ch.qos.logback.core.joran"><level value="INFO" /></logger>
+ <logger name="ch.qos.logback.classic.joran"><level value="INFO" /></logger>
+
+ <root>
+ <level value="debug" />
+ <appender-ref ref="DB" />
+ </root>
</configuration>
Modified: logback/trunk/logback-examples/src/main/java/chapter4/db/append-with-datasource.xml
==============================================================================
--- logback/trunk/logback-examples/src/main/java/chapter4/db/append-with-datasource.xml (original)
+++ logback/trunk/logback-examples/src/main/java/chapter4/db/append-with-datasource.xml Wed Nov 8 10:06:07 2006
@@ -6,6 +6,10 @@
<connectionSource class="ch.qos.logback.core.db.DataSourceConnectionSource">
<dataSource class="${dataSourceClass}">
+ <!-- Joran cannot substitute variables
+ that are not attribute values. Therefore, we cannot
+ declare the next parameter like the others.
+ -->
<param name="${url-key:-url}" value="${url}"/>
<serverName>${serverName}</serverName>
<databaseName>${databaseName}</databaseName>
Modified: logback/trunk/logback-examples/src/main/java/chapter4/db/append-with-drivermanager.xml
==============================================================================
--- logback/trunk/logback-examples/src/main/java/chapter4/db/append-with-drivermanager.xml (original)
+++ logback/trunk/logback-examples/src/main/java/chapter4/db/append-with-drivermanager.xml Wed Nov 8 10:06:07 2006
@@ -3,7 +3,8 @@
<configuration>
<appender name="DB" class="ch.qos.logback.classic.db.DBAppender">
- <connectionSource class="ch.qos.logback.core.db.DriverManagerConnectionSource">
+ <connectionSource
+ class="ch.qos.logback.core.db.DriverManagerConnectionSource">
<driverClass>${driverClass}</driverClass>
<url>${url}</url>
<user>${user}</user>
Modified: logback/trunk/logback-examples/src/main/java/chapter4/db/append-with-jndi.xml
==============================================================================
--- logback/trunk/logback-examples/src/main/java/chapter4/db/append-with-jndi.xml (original)
+++ logback/trunk/logback-examples/src/main/java/chapter4/db/append-with-jndi.xml Wed Nov 8 10:06:07 2006
@@ -4,7 +4,7 @@
<!-- We create a joran rule that will instance and bind the appropriate
data source instance to JNDI. -->
<newRule pattern="configuration/bindDataSourceToJNDI"
- actionClass="org.apache.log4j.db.BindDataSourceToJNDIAction"/>
+ actionClass="ch.qos.logback.core.db.BindDataSourceToJNDIAction"/>
<bindDataSourceToJNDI />
@@ -12,6 +12,10 @@
<connectionSource class="ch.qos.logback.core.db.DataSourceConnectionSource">
<dataSource class="${dataSourceClass}">
+ <!-- Joran cannot substitute variables
+ that are not attribute values. Therefore, we cannot
+ declare the next parameter like the others.
+ -->
<param name="${url-key:-url}" value="${url}"/>
<serverName>${serverName}</serverName>
<databaseName>${databaseName}</databaseName>
Modified: logback/trunk/logback-examples/src/main/java/chapter4/db/append-with-pooled-datasource.xml
==============================================================================
--- logback/trunk/logback-examples/src/main/java/chapter4/db/append-with-pooled-datasource.xml (original)
+++ logback/trunk/logback-examples/src/main/java/chapter4/db/append-with-pooled-datasource.xml Wed Nov 8 10:06:07 2006
@@ -6,6 +6,10 @@
<connectionSource class="ch.qos.logback.core.db.DataSourceConnectionSource">
<dataSource class="${pooledDataSourceClass}">
+ <!-- Joran cannot substitute variables
+ that are not attribute values. Therefore, we cannot
+ declare the next parameter like the others.
+ -->
<param name="${url-key:-url}" value="${url}"/>
<serverName>${serverName}</serverName>
<databaseName>${databaseName}</databaseName>
Added: logback/trunk/logback-site/src/site/resources/manual/images/chapter4/dbAppenderLE.gif
==============================================================================
Binary file. No diff available.
Added: logback/trunk/logback-site/src/site/resources/manual/images/chapter4/dbAppenderLEException.gif
==============================================================================
Binary file. No diff available.
Added: logback/trunk/logback-site/src/site/resources/manual/images/chapter4/dbAppenderLEProperty.gif
==============================================================================
Binary file. No diff available.
Modified: logback/trunk/logback-site/src/site/site.xml
==============================================================================
--- logback/trunk/logback-site/src/site/site.xml (original)
+++ logback/trunk/logback-site/src/site/site.xml Wed Nov 8 10:06:07 2006
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
-<project name="Logback Main Site">
+<project name="Logback Project">
<skin>
<groupId>ch.qos.logback</groupId>
@@ -10,7 +10,7 @@
<publishDate position="navigation-bottom" format="dd-MM-yyyy"/>
<bannerLeft>
- <name>${project.name}</name>
+ <name>Logback Project</name>
<src>/images/logos/lblogo.jpg</src>
<href>http://logback.qos.ch</href>
</bannerLeft>
@@ -24,7 +24,7 @@
</links>
-->
- <menu name="${project.name}">
+ <menu name="Logback Project">
<item name="Introduction" href="index.html"/>
<item name="News" href="news.html" />
<item name="Download" href="download.html" />
Modified: logback/trunk/logback-site/src/site/xdocTemplates/manual/appenders.xml
==============================================================================
--- logback/trunk/logback-site/src/site/xdocTemplates/manual/appenders.xml (original)
+++ logback/trunk/logback-site/src/site/xdocTemplates/manual/appenders.xml Wed Nov 8 10:06:07 2006
@@ -1380,9 +1380,10 @@
<h3>SMTPAppender</h3>
<p>
- The <code>SMTPAppender</code> accumulates logging events in a fixed-size
- buffer and sends them in an email when a user specified triggering event occurs.
- By default, the triggering event is taken as the reception of an event
+ The <a href="../xref/ch/qos/logback/classic/net/SMTPAppender.html"><code>SMTPAppender</code></a>
+ accumulates logging events in a fixed-size buffer and sends them in an email when a
+ user specified triggering event occurs.
+ By default, the triggering event is taken as the reception of an event
of level <em>ERROR</em> or higher.
</p>
@@ -1643,17 +1644,331 @@
</configuration></pre></div>
<h3>DBAppender</h3>
+
+ <p>
+ The <a href="../xref/ch/qos/logback/classic/db/DBAppender.html"><code>DBAppender</code></a>
+ inserts loggin events into three database tables in a format
+ independent of the Java programming language.
+ </p>
+ <p>
+ These three tables are <em>logging_event</em>, <em>logging_event_property</em> and
+ <em>logging_event_exception</em>. They all must exist before <code>DBAppender</code>
+ can be used. Logback ships with SQL scripts that will create the tables.
+ They can be found in the found in the
+ <em>logback-classic/src/main/java/ch/qos/logback/classic/db/dialect</em> directory. There
+ is a specific script for each of the most popular database systems.
+ If the script for your particular type of database system is missing, it should be
+ quite easy to write one, taking example on the already existing scripts. If
+ you send them to us, we will gladly include missing scripts in future
+ </p>
+ <p>
+ If the JDBC driver you are using supports the
+ <code>getGeneratedKeys</code> method introduced in
+ JDBC 3.0 specification, then no more steps are required, excluding usual
+ configuration.
+ </p>
+ <p>
+ Otherwise, there must be an <code>SQLDialect</code> appropriate for your
+ database system. Currently, we have dialects for PostgreSQL,
+ MySQL, Oracle and MsSQL. As mentioned previously, an
+ <code>SQLDialect</code> is required only if the JDBC driver for your
+ database system does not support the <code>getGeneratedKeys</code>
+ method.
+ </p>
+ <p>
+ The table below summarizes the database tapes and their support of the
+ <code>getGeneratedKeys()</code> method.
+ </p>
+ <table border="1" cellpadding="4">
+ <tr>
+ <th>RDBMS</th>
+ <th>
+ supports
+ <br />
+ <code>getGeneratedKeys()</code>
+ method
+ </th>
+ <th>
+ specific
+ <br />
+ SQLDialect support
+ </th>
+ </tr>
+ <tr>
+ <td>PostgreSQL</td>
+ <td>NO</td>
+ <td>present and used</td>
+ </tr>
+ <tr>
+ <td>MySQL</td>
+ <td>YES</td>
+ <td>present, but not actually needed or used</td>
+ </tr>
+ <tr>
+ <td>Oracle</td>
+ <td>YES</td>
+ <td>present, but not actually needed or used</td>
+ </tr>
+ <tr>
+ <td>DB2</td>
+ <td>YES</td>
+ <td>not present, and not needed or used</td>
+ </tr>
+ <tr>
+ <td>MsSQL</td>
+ <td>YES</td>
+ <td>not present, and not needed or used</td>
+ </tr>
+ <tr>
+ <td>HSQL</td>
+ <td>NO</td>
+ <td>present and used</td>
+ </tr>
+ </table>
+
+ <p>
+ Experiments show that writing a single event
+ into the database takes approximately 50 milliseconds, on a
+ "standard" PC. If pooled connections are used, this figure
+ drops to under 10 milliseconds. Note that most JDBC drivers
+ already ship with connection pooling support.
+ </p>
+
+ <p>
+ Configuring logback to use <code>DBAppender</code> can be done
+ in several different ways, depending on the tools one has to
+ connect to the database, and the database itself.
+ </p>
+
+ <p>
+ The first example that we will review is a configuration using
+ <code>DriverManagerConnectionSource</code> and a MySQL database.
+ The following configuration file is what one would need.
+ </p>
+
+<em>Example 4.6: <code>DBAppender</code> configuration (logback-examples/src/main/java/chapter4/db/append-toMySQL-with-driverManager.xml)</em>
+<div class="source"><pre><configuration>
+ <b><appender name="DB" class="ch.qos.logback.classic.db.DBAppender">
+ <connectionSource class="ch.qos.logback.core.db.DriverManagerConnectionSource">
+ <driverClass>com.mysql.jdbc.Driver</driverClass>
+ <url>jdbc:mysql://host_name:3306/datebase_name</url>
+ <user>username</user>
+ <password>password</password>
+ </connectionSource>
+ </appender></b>
+
+ <!-- Prevent internal logback DEBUG messages from polluting the output. -->
+ <logger name="ch.qos.logback.core.joran"><level value="INFO" /></logger>
+ <logger name="ch.qos.logback.classic.joran"><level value="INFO" /></logger>
+
+ <root>
+ <level value="debug" />
+ <appender-ref ref="DB" />
+ </root>
+</configuration></pre></div>
+ <p>
+ The correct driver must be declared. Here, the <code>com.mysql.jdbc.Driver</code>
+ class is used. The <span class="option">url</span> must begin with <em>jdbc:myslq://</em>.
+ </p>
+
+ <p>Connecting to a database using a <code>DataSource</code> is rather similar:</p>
+
+<em>Example 4.7: <code>DBAppender</code> configuration (logback-examples/src/main/java/chapter4/db/append-with-datasource.xml)</em>
+<div class="source"><pre><configuration>
+ <appender name="DB" class="ch.qos.logback.classic.db.DBAppender">
+ <b><connectionSource class="ch.qos.logback.core.db.DataSourceConnectionSource">
+
+ <dataSource class="${dataSourceClass}">
+ </b><!-- Joran cannot substitute variables
+ that are not attribute values. Therefore, we cannot
+ declare the next parameter like the others.
+ -->
+ <b><param name="${url-key:-url}" value="${url_value}"/>
+ <serverName>${serverName}</serverName>
+ <databaseName>${databaseName}</databaseName>
+ </dataSource></b>
+
+ <user>${user}</user>
+ <password>${password}</password>
+ </connectionSource>
+ </appender>
+
+ <!-- Prevent internal logback DEBUG messages from polluting the output. -->
+ <logger name="ch.qos.logback.core.joran"><level value="INFO" /></logger>
+ <logger name="ch.qos.logback.classic.joran"><level value="INFO" /></logger>
+
+ <root>
+ <level value ="debug"/>
+ <appender-ref ref="DB" />
+ </root>
+</configuration></pre></div>
+ <p>
+ Not that in this configuration sample, we make heavy use of substitution variables.
+ They are sometimes handy when connection details have to be centralised in a
+ single configuration file and shared by logback and other frameworks.
+ </p>
+
+ <p>
+ Once logback is configured properly, the logging events are sent to
+ the specified database. As stated previously, there are three tables
+ used by logback to store logging event data.
+ </p>
+
+ <p>
+ The <em>logging_event</em> table contains the following fields:
+ </p>
+ <table>
+ <tr>
+ <th>Field</th>
+ <th>Type</th>
+ <th>Description</th>
+ </tr>
+ <tr>
+ <td><b>timestmp</b></td>
+ <td><code>big int</code></td>
+ <td>The timestamp that was valid at the logging event's creation.</td>
+ </tr>
+ <tr>
+ <td><b>formatted_message</b></td>
+ <td><code>text</code></td>
+ <td>The message that has been added to the logging event, after formatting with
+ <code>org.slf4j.impl.MessageFormatter</code>, in case object were passed
+ along with the message.</td>
+ </tr>
+ <tr>
+ <td><b>logger_name</b></td>
+ <td><code>varchar</code></td>
+ <td>The name of the logger used to issue the logging request.</td>
+ </tr>
+ <tr>
+ <td><b>level_string</b></td>
+ <td><code>varchar</code></td>
+ <td>The level of the logging event.</td>
+ </tr>
+ <tr>
+ <td><b>reference_flag</b></td>
+ <td><code>smallint</code></td>
+ <td>
+ <p>
+ This field is used by logback to identify logging events that
+ have an exception or <code>MDC</code>property values associated.
+ </p>
+ <p>
+ It's value is computed by
+ <code>ch.qos.logback.classic.db.DBHelper</code>. A logging event that
+ contains <code>MDC</code> or <code>Context</code>
+ properties has a flag number of <em>1</em>. One
+ that contains an exception has a flag number of <em>2</em>. A logging
+ event that contains both elements has a flag number of <em>3</em>.
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td><b>caller_filename</b></td>
+ <td><code>varchar</code></td>
+ <td>The name of the file where the logging request was issued.</td>
+ </tr>
+ <tr>
+ <td><b>caller_class</b></td>
+ <td><code>varchar</code></td>
+ <td>The class where the logging request was issued.</td>
+ </tr>
+ <tr>
+ <td><b>caller_method</b></td>
+ <td><code>varchar</code></td>
+ <td>The name of the method where the logging request was issued.</td>
+ </tr>
+ <tr>
+ <td><b>caller_line</b></td>
+ <td><code>char</code></td>
+ <td>The line number where the logging request was issued.</td>
+ </tr>
+ <tr>
+ <td><b>event_id</b></td>
+ <td><code>int</code></td>
+ <td>The database id of the logging event.</td>
+ </tr>
+ </table>
+
+ <p>
+ The <em>logging_event_property</em> is used to store the keys and values
+ contained in the <code>MDC</code> or the <code>Context</code>.
+ It contains these fields:
+ </p>
+ <table>
+ <tr>
+ <th>Field</th>
+ <th>Type</th>
+ <th>Description</th>
+ </tr>
+ <tr>
+ <td><b>event_id</b></td>
+ <td><code>int</code></td>
+ <td>The database id of the logging event.</td>
+ </tr>
+ <tr>
+ <td><b>mapped_key</b></td>
+ <td><code>varchar</code></td>
+ <td>The key of the <code>MDC</code> property</td>
+ </tr>
+ <tr>
+ <td><b>mapped_value</b></td>
+ <td><code>text</code></td>
+ <td>The value of the <code>MDC</code> property</td>
+ </tr>
+ </table>
+
+ <p>
+ The <em>logging_event_exception</em> table contains the following fields:
+ </p>
+
+ <table>
+ <tr>
+ <th>Field</th>
+ <th>Type</th>
+ <th>Description</th>
+ </tr>
+ <tr>
+ <td><b>event_id</b></td>
+ <td><code>int</code></td>
+ <td>The database id of the logging event.</td>
+ </tr>
+ <tr>
+ <td><b>i</b></td>
+ <td><code>smallint</code></td>
+ <td>The index of the line in the full stack trace.</td>
+ </tr>
+ <tr>
+ <td><b>trace_line</b></td>
+ <td><code>varchar</code></td>
+ <td>The corresponding line</td>
+ </tr>
+ </table>
+
+ <p>
+ To give a more visual example of the work done by <code>DBAppender</code>, here
+ is a screenshot of a MySQL database with content provided by <code>DBAppender</code>.
+ </p>
+
+ <p>The <em>logging_event</em> table:</p>
+ <img src="images/chapter4/dbAppenderLE.gif" alt="Logging Event table" />
+ <p>The <em>logging_event_exception</em> table:</p>
+
+ <img src="images/chapter4/dbAppenderLEException.gif" alt="Logging Event Exception table" />
+ <p>The <em>logging_event_property</em> table:</p>
+
+ <img src="images/chapter4/dbAppenderLEProperty.gif" alt="Logging Event Property table" />
<h3>SyslogAppender</h3>
1
0

svn commit: r882 - logback/trunk/logback-core/src/main/java/ch/qos/logback/core/db
by noreply.seb@qos.ch 07 Nov '06
by noreply.seb@qos.ch 07 Nov '06
07 Nov '06
Author: seb
Date: Tue Nov 7 14:46:11 2006
New Revision: 882
Added:
logback/trunk/logback-core/src/main/java/ch/qos/logback/core/db/BindDataSourceToJNDIAction.java
Log:
added BindDataSourceToJNDIAction.java
Added: logback/trunk/logback-core/src/main/java/ch/qos/logback/core/db/BindDataSourceToJNDIAction.java
==============================================================================
--- (empty file)
+++ logback/trunk/logback-core/src/main/java/ch/qos/logback/core/db/BindDataSourceToJNDIAction.java Tue Nov 7 14:46:11 2006
@@ -0,0 +1,85 @@
+/**
+ * Logback: the reliable, generic, fast and flexible logging framework.
+ *
+ * Copyright (C) 1999-2006, QOS.ch
+ *
+ * This library is free software, you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation.
+ */
+
+package ch.qos.logback.core.db;
+
+
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.sql.DataSource;
+
+import org.xml.sax.Attributes;
+
+import ch.qos.logback.core.joran.action.Action;
+import ch.qos.logback.core.joran.spi.InterpretationContext;
+import ch.qos.logback.core.util.OptionHelper;
+import ch.qos.logback.core.util.PropertySetter;
+
+/**
+ *
+ * @author Ceki Gulcu
+ *
+ */
+public class BindDataSourceToJNDIAction extends Action {
+
+ static final String DATA_SOURCE_CLASS = "dataSourceClass";
+ static final String URL = "url";
+ static final String USER = "user";
+ static final String PASSWORD = "password";
+
+ /**
+ * Instantiates an a data source and bind it to JNDI
+ * Most of the required parameters are placed in the ec.substitutionProperties
+ */
+ public void begin(
+ InterpretationContext ec, String localName, Attributes attributes) {
+ String dsClassName = ec.getSubstitutionProperty(DATA_SOURCE_CLASS);
+
+ if (OptionHelper.isEmpty(dsClassName)) {
+ addWarn("dsClassName is a required parameter");
+ ec.addError("dsClassName is a required parameter");
+
+ return;
+ }
+
+ String urlStr = ec.getSubstitutionProperty(URL);
+ String userStr = ec.getSubstitutionProperty(USER);
+ String passwordStr = ec.getSubstitutionProperty(PASSWORD);
+
+ try {
+ DataSource ds =
+ (DataSource) OptionHelper.instantiateByClassName(dsClassName, DataSource.class);
+
+ PropertySetter setter = new PropertySetter(ds);
+
+ if (!OptionHelper.isEmpty(urlStr)) {
+ setter.setProperty("url", urlStr);
+ }
+
+ if (!OptionHelper.isEmpty(userStr)) {
+ setter.setProperty("user", userStr);
+ }
+
+ if (!OptionHelper.isEmpty(passwordStr)) {
+ setter.setProperty("password", passwordStr);
+ }
+
+ Context ctx = new InitialContext();
+ ctx.rebind("dataSource", ds);
+ } catch (Exception oops) {
+ addError(
+ "Could not bind datasource. Reported error follows.", oops);
+ ec.addError("Could not not bind datasource of type [" + dsClassName + "].");
+ }
+ }
+
+ public void end(InterpretationContext ec, String name) {
+ }
+}
1
0

07 Nov '06
Author: seb
Date: Tue Nov 7 11:45:21 2006
New Revision: 881
Removed:
logback/trunk/logback-classic/src/test/input/db/
Log:
moved example configurations to example module
moved deleteTables.sql to appropriate package
1
0