<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body style="color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">
<div>
<div>
<div>I'm trying to get 5 emails sent and am getting 1 random one sent. </div>
<div><br>
</div>
<div><br>
</div>
<div>
<div> log = LoggerFactory.getLogger("applogger");</div>
<div> //TODO Get emails sending</div>
<div> logErr = LoggerFactory.getLogger("Error");</div>
<div> log.info("test logger");</div>
<div> logErr.error("test error message1");</div>
<div> logErr.error("test error message2");</div>
<div> logErr.error("test error message3");</div>
<div> logErr.error("test error message4");</div>
<div> logErr.error("test error message5");</div>
<div> log.error("from applogger");</div>
<div> try {</div>
<div> Thread.sleep(5000);</div>
<div> } catch(InterruptedException ex) {</div>
<div> Thread.currentThread().interrupt();</div>
<div> }</div>
<div> System.exit(0);</div>
</div>
<div><br>
</div>
<div>Sends one email out of the 5 error messages and the one sent is not predictable.</div>
<div><br>
</div>
<div>Config file</div>
<div>
<div><configuration debug="true"></div>
<div> <timestamp key="bySecond" datePattern="yyyyMMdd'T'HHmmss"/></div>
<div><br>
</div>
<div> <appender name="ERROREMAIL" class="ch.qos.logback.classic.net.SMTPAppender"></div>
<div> <cyclicBufferTracker class="ch.qos.logback.core.spi.CyclicBufferTracker"></div>
<div> <!-- send just one log entry per email --></div>
<div> <bufferSize>1</bufferSize></div>
<div> </cyclicBufferTracker></div>
<div> <smtpHost>mysmtp.host.edu</smtpHost></div>
<div> <to><a href="mailto:epalmer@richmond.edu">epalmer@richmond.edu</a></to></div>
<div> <from><a href="mailto:epalmer@richmond.edu">epalmer@richmond.edu</a></from></div>
<div> <subject>Error in DirPeople2Xml: %logger{20} - %m</subject></div>
<div> <layout class="ch.qos.logback.classic.PatternLayout"></div>
<div> <pattern>%date %-30(%d{HH:mm:ss.SSS} [%M]) %-5level %-33(%C{32}) - %msg%n</pattern></div>
<div> </layout></div>
<div> </appender></div>
<div><br>
</div>
<div> <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"></div>
<div> <!-- encoders are assigned the type</div>
<div> ch.qos.logback.classic.encoder.PatternLayoutEncoder by default --></div>
<div> <encoder></div>
<div> <pattern>%-30(%d{HH:mm:ss.SSS} [%M]) %-5level %-33(%C{32}) - %msg%n</pattern></div>
<div> </encoder></div>
<div> </appender></div>
<div><br>
</div>
<div> <appender name="FILE" class="ch.qos.logback.core.FileAppender"></div>
<div> <file>/Volumes/HD2/IDEAProjects/DirPeople2Xml/local/logs/log-${bySecond}.log</file></div>
<div> <append>true</append></div>
<div> <!-- encoders are assigned the type</div>
<div> ch.qos.logback.classic.encoder.PatternLayoutEncoder by default --></div>
<div> <encoder></div>
<div> <pattern>%-30(%d{HH:mm:ss.SSS} [%M]) %-5level %-33(%C{32}) - %msg%n</pattern></div>
<div> </encoder></div>
<div> </appender></div>
<div><br>
</div>
<div> <logger name="Error" level="error"></div>
<div> <appender-ref ref="ERROREMAIL" /></div>
<div> </logger></div>
<div> <root level="info"></div>
<div> <appender-ref ref="FILE" /></div>
<div> <appender-ref ref="STDOUT" /></div>
<div> </root></div>
<div></configuration></div>
</div>
<div><br>
</div>
<div><br>
</div>
<div>Stdout messages</div>
<div>
<div>07:42:08,457 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback.groovy]</div>
<div>07:42:08,457 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Found resource [logback-test.xml] at [file:/Volumes/HD2/IDEAProjects/DirPeople2Xml/target/classes/logback-test.xml]</div>
<div>07:42:08,573 |-INFO in ch.qos.logback.core.joran.action.TimestampAction - Using current interpretation time, i.e. now, as time reference.</div>
<div>07:42:08,575 |-INFO in ch.qos.logback.core.joran.action.TimestampAction - Adding property to the context with key="bySecond" and value="20130621T074208" to the LOCAL scope</div>
<div>07:42:08,575 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.classic.net.SMTPAppender]</div>
<div>07:42:08,592 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [ERROREMAIL]</div>
<div>07:42:08,690 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.ConsoleAppender]</div>
<div>07:42:08,693 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [STDOUT]</div>
<div>07:42:08,697 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property</div>
<div>07:42:08,703 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.FileAppender]</div>
<div>07:42:08,705 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [FILE]</div>
<div>07:42:08,708 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property</div>
<div>07:42:08,708 |-INFO in ch.qos.logback.core.FileAppender[FILE] - File property is set to [/Volumes/HD2/IDEAProjects/DirPeople2Xml/local/logs/log-20130621T074208.log]</div>
<div>07:42:08,711 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [Error] to ERROR</div>
<div>07:42:08,711 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [ERROREMAIL] to Logger[Error]</div>
<div>07:42:08,712 |-INFO in ch.qos.logback.classic.joran.action.RootLoggerAction - Setting level of ROOT logger to INFO</div>
<div>07:42:08,712 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [FILE] to Logger[ROOT]</div>
<div>07:42:08,712 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [STDOUT] to Logger[ROOT]</div>
<div>07:42:08,712 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - End of configuration.</div>
<div>07:42:08,713 |-INFO in ch.qos.logback.classic.joran.JoranConfigurator@5e0feb48 - Registering current configuration as safe fallback point</div>
<div>07:42:08.717 [main] INFO e.r.i.w.D.PeopleXmlMain - some log message</div>
<div>07:42:08.721 [startApp] INFO e.r.i.w.DirPeople2Xml.AppInfo - test logger</div>
<div>07:42:08,728 |-INFO in ch.qos.logback.classic.net.SMTPAppender[ERROREMAIL] - SMTPAppender [ERROREMAIL] is tracking [1] buffers</div>
<div>07:42:08.721 [startApp] ERROR e.r.i.w.DirPeople2Xml.AppInfo - test error message1</div>
<div>07:42:08.728 [startApp] ERROR e.r.i.w.DirPeople2Xml.AppInfo - test error message2</div>
<div>07:42:08.728 [startApp] ERROR e.r.i.w.DirPeople2Xml.AppInfo - test error message3</div>
<div>07:42:08.729 [startApp] ERROR e.r.i.w.DirPeople2Xml.AppInfo - test error message4</div>
<div>07:42:08.729 [startApp] ERROR e.r.i.w.DirPeople2Xml.AppInfo - test error message5</div>
<div>07:42:08.730 [startApp] ERROR e.r.i.w.DirPeople2Xml.AppInfo - from applogger</div>
<div>07:42:08,754 |-INFO in ch.qos.logback.classic.net.SMTPAppender[ERROREMAIL] - About to send out SMTP message "Error in DirPeople2Xml: Error - test error message2" to [<a href="mailto:epalmer@richmond.edu">epalmer@richmond.edu</a>]</div>
<div>07:42:08,754 |-INFO in ch.qos.logback.classic.net.SMTPAppender[ERROREMAIL] - About to send out SMTP message "Error in DirPeople2Xml: Error - test error message5" to [<a href="mailto:epalmer@richmond.edu">epalmer@richmond.edu</a>]</div>
<div>07:42:08,755 |-INFO in ch.qos.logback.classic.net.SMTPAppender[ERROREMAIL] - About to send out SMTP message "Error in DirPeople2Xml: Error - test error message4" to [<a href="mailto:epalmer@richmond.edu">epalmer@richmond.edu</a>]</div>
<div>07:42:08,755 |-INFO in ch.qos.logback.classic.net.SMTPAppender[ERROREMAIL] - About to send out SMTP message "Error in DirPeople2Xml: Error - test error message1" to [<a href="mailto:epalmer@richmond.edu">epalmer@richmond.edu</a>]</div>
<div>07:42:08,755 |-INFO in ch.qos.logback.classic.net.SMTPAppender[ERROREMAIL] - About to send out SMTP message "Error in DirPeople2Xml: Error - test error message3" to [<a href="mailto:epalmer@richmond.edu">epalmer@richmond.edu</a>]</div>
</div>
<div><br>
</div>
<div><br>
</div>
<div>Thanks in advance for help</div>
<div><br>
</div>
<div>
<div>
<div>
<div>-- </div>
<div>Eric Palmer</div>
</div>
<div>Web Services</div>
<div>U of Richmond</div>
<div><br>
</div>
</div>
</div>
</div>
</div>
</body>
</html>