[logback-dev] [GIT] Logback: the generic, reliable, fast and flexible logging framework. branch master updated. v_1.0.2-9-gfdd1363
Gitbot
git-noreply at pixie.qos.ch
Thu May 3 21:37:17 CEST 2012
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Logback: the generic, reliable, fast and flexible logging framework.".
The branch, master has been updated
via fdd1363fa8fb6798a1aef048f580c82d3a5cdc51 (commit)
from 22126c5c13088502dc0b5c9c7dda4218ac3c8978 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.qos.ch/gitweb/?p=logback.git;a=commit;h=fdd1363fa8fb6798a1aef048f580c82d3a5cdc51
http://github.com/ceki/logback/commit/fdd1363fa8fb6798a1aef048f580c82d3a5cdc51
commit fdd1363fa8fb6798a1aef048f580c82d3a5cdc51
Author: Ceki Gulcu <ceki at qos.ch>
Date: Thu May 3 21:36:35 2012 +0200
working on lbclassic232
diff --git a/logback-classic/src/test/java/ch/qos/logback/classic/issue/lbclassic232/Simple.java b/logback-classic/src/test/java/ch/qos/logback/classic/issue/lbclassic232/Simple.java
new file mode 100644
index 0000000..a700160
--- /dev/null
+++ b/logback-classic/src/test/java/ch/qos/logback/classic/issue/lbclassic232/Simple.java
@@ -0,0 +1,34 @@
+package ch.qos.logback.classic.issue.lbclassic232;
+
+import ch.qos.logback.classic.LoggerContext;
+import ch.qos.logback.classic.joran.JoranConfigurator;
+import ch.qos.logback.core.joran.spi.JoranException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class Simple {
+
+ static Logger logger = LoggerFactory.getLogger(Simple.class);
+ static String DIR_PREFIX = "src/test/java/ch/qos/logback/classic/issue/lbclassic232/";
+
+ public static void main(String[] args) throws JoranException, InterruptedException {
+ init(DIR_PREFIX + "logback_smtp.xml");
+
+ for (int i = 0; i < 10; i++) {
+ logger.debug("SEE IF THIS IS LOGGED {}.", i);
+ }
+
+ logger.error("trigger");
+
+ }
+
+
+ static void init(String file) throws JoranException {
+ LoggerContext loggerContext = (LoggerContext) LoggerFactory.getILoggerFactory();
+ JoranConfigurator jc = new JoranConfigurator();
+ jc.setContext(loggerContext);
+ loggerContext.reset();
+ jc.doConfigure(file);
+ }
+
+}
diff --git a/logback-classic/src/test/java/ch/qos/logback/classic/issue/lbclassic232/logback_smtp.xml b/logback-classic/src/test/java/ch/qos/logback/classic/issue/lbclassic232/logback_smtp.xml
new file mode 100644
index 0000000..6b39693
--- /dev/null
+++ b/logback-classic/src/test/java/ch/qos/logback/classic/issue/lbclassic232/logback_smtp.xml
@@ -0,0 +1,18 @@
+<configuration scan="true" scanPeriod="3 seconds" debug="true">
+ <appender name="EMAIL" class="ch.qos.logback.classic.net.SMTPAppender">
+ <smtpHost>smtp.gmail.com</smtpHost>
+ <smtpPort>465</smtpPort>
+ <to>${destination}</to>
+ <password>${password}</password>
+ <from>noreply at qos.ch</from>
+ <subject>%logger{20} - %m</subject>
+ <username>${destination}</username>
+ <SSL>true</SSL>
+ <layout class="ch.qos.logback.classic.PatternLayout">
+ <pattern>%date %-5level %logger{35} - %message%n</pattern>
+ </layout>
+ </appender>
+ <root level="DEBUG">
+ <appender-ref ref="EMAIL"/>
+ </root>
+</configuration>
\ No newline at end of file
diff --git a/logback-core/src/main/java/ch/qos/logback/core/net/SMTPAppenderBase.java b/logback-core/src/main/java/ch/qos/logback/core/net/SMTPAppenderBase.java
index d9318d9..68365ec 100644
--- a/logback-core/src/main/java/ch/qos/logback/core/net/SMTPAppenderBase.java
+++ b/logback-core/src/main/java/ch/qos/logback/core/net/SMTPAppenderBase.java
@@ -82,6 +82,8 @@ public abstract class SMTPAppenderBase<E> extends AppenderBase<E> {
String password;
String localhost;
+ boolean asynchronousSending = true;
+
private String charsetEncoding = "UTF-8";
protected MimeMessage mimeMsg;
-----------------------------------------------------------------------
Summary of changes:
.../logback/classic/issue/lbclassic232/Simple.java | 34 ++++++++++++++++++++
.../classic/issue/lbclassic232/logback_smtp.xml | 18 ++++++++++
.../ch/qos/logback/core/net/SMTPAppenderBase.java | 2 +
3 files changed, 54 insertions(+), 0 deletions(-)
create mode 100644 logback-classic/src/test/java/ch/qos/logback/classic/issue/lbclassic232/Simple.java
create mode 100644 logback-classic/src/test/java/ch/qos/logback/classic/issue/lbclassic232/logback_smtp.xml
hooks/post-receive
--
Logback: the generic, reliable, fast and flexible logging framework.
More information about the logback-dev
mailing list