Skip to content

Instantly share code, notes, and snippets.

@bretthoerner
Last active February 17, 2017 19:14
Show Gist options
  • Save bretthoerner/890ea59211642fe882dd380ab020a634 to your computer and use it in GitHub Desktop.
Save bretthoerner/890ea59211642fe882dd380ab020a634 to your computer and use it in GitHub Desktop.
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
<log4j:configuration debug="true"
xmlns:log4j='http://jakarta.apache.org/log4j/'>
<appender name="console" class="org.apache.log4j.ConsoleAppender">
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern"
value="%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}: - %m%n" />
</layout>
</appender>
<appender name="sentry" class="com.getsentry.raven.log4j.SentryAppender">
<filter class="org.apache.log4j.varia.LevelRangeFilter">
<param name="levelMin" value="WARN"/>
</filter>
</appender>
<root>
<level value="INFO" />
<appender-ref ref="console" />
<appender-ref ref="sentry" />
</root>
</log4j:configuration>
[com.getsentry.example.Application.main()] INFO com.getsentry.raven.DefaultRavenFactory - Using an HTTP connection to Sentry.
log4j: Adding appender named [sentry] to category [root].
2017-02-17 12:33:26 INFO Application: - Info message
2017-02-17 12:33:26 WARN Application: - Warn message
[com.getsentry.example.Application.main()] WARN com.getsentry.raven.connection.AbstractConnection - An exception due to the connection occurred, a lockdown will be initiated.
com.getsentry.raven.connection.ConnectionException: An exception occurred while submitting the event to the sentry server.
at com.getsentry.raven.connection.HttpConnection.doSend(HttpConnection.java:175)
at com.getsentry.raven.connection.AbstractConnection.send(AbstractConnection.java:86)
at com.getsentry.raven.Raven.sendEvent(Raven.java:95)
at com.getsentry.raven.log4j.SentryAppender.append(SentryAppender.java:187)
at org.apache.log4j.AppenderSkeleton.doAppend(AppenderSkeleton.java:251)
at org.apache.log4j.helpers.AppenderAttachableImpl.appendLoopOnAppenders(AppenderAttachableImpl.java:66)
at org.apache.log4j.Category.callAppenders(Category.java:206)
at org.apache.log4j.Category.forcedLog(Category.java:391)
at org.apache.log4j.Category.warn(Category.java:1043)
at com.getsentry.example.Application.main(Application.java:13)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:293)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.io.IOException: This is a fake IOException.
at com.getsentry.raven.connection.HttpConnection.doSend(HttpConnection.java:157)
... 15 more
[com.getsentry.example.Application.main()] WARN com.getsentry.raven.connection.AbstractConnection - Lockdown started for 10ms.
[com.getsentry.example.Application.main()] WARN com.getsentry.raven.connection.AbstractConnection - Lockdown ended.
[com.getsentry.example.Application.main()] ERROR com.getsentry.raven.Raven - An exception occurred while sending the event to Sentry.
com.getsentry.raven.connection.ConnectionException: An exception occurred while submitting the event to the sentry server.
at com.getsentry.raven.connection.HttpConnection.doSend(HttpConnection.java:175)
at com.getsentry.raven.connection.AbstractConnection.send(AbstractConnection.java:86)
at com.getsentry.raven.Raven.sendEvent(Raven.java:95)
at com.getsentry.raven.log4j.SentryAppender.append(SentryAppender.java:187)
at org.apache.log4j.AppenderSkeleton.doAppend(AppenderSkeleton.java:251)
at org.apache.log4j.helpers.AppenderAttachableImpl.appendLoopOnAppenders(AppenderAttachableImpl.java:66)
at org.apache.log4j.Category.callAppenders(Category.java:206)
at org.apache.log4j.Category.forcedLog(Category.java:391)
at org.apache.log4j.Category.warn(Category.java:1043)
at com.getsentry.example.Application.main(Application.java:13)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:293)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.io.IOException: This is a fake IOException.
at com.getsentry.raven.connection.HttpConnection.doSend(HttpConnection.java:157)
... 15 more
2017-02-17 12:33:26 ERROR Application: - Caught exception!
java.lang.ArithmeticException: / by zero
at com.getsentry.example.Application.main(Application.java:16)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:293)
at java.lang.Thread.run(Thread.java:745)
[com.getsentry.example.Application.main()] WARN com.getsentry.raven.connection.AbstractConnection - An exception due to the connection occurred, a lockdown will be initiated.
com.getsentry.raven.connection.ConnectionException: An exception occurred while submitting the event to the sentry server.
at com.getsentry.raven.connection.HttpConnection.doSend(HttpConnection.java:175)
at com.getsentry.raven.connection.AbstractConnection.send(AbstractConnection.java:86)
at com.getsentry.raven.Raven.sendEvent(Raven.java:95)
at com.getsentry.raven.log4j.SentryAppender.append(SentryAppender.java:187)
at org.apache.log4j.AppenderSkeleton.doAppend(AppenderSkeleton.java:251)
at org.apache.log4j.helpers.AppenderAttachableImpl.appendLoopOnAppenders(AppenderAttachableImpl.java:66)
at org.apache.log4j.Category.callAppenders(Category.java:206)
at org.apache.log4j.Category.forcedLog(Category.java:391)
at org.apache.log4j.Category.error(Category.java:322)
at com.getsentry.example.Application.main(Application.java:18)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:293)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.io.IOException: This is a fake IOException.
at com.getsentry.raven.connection.HttpConnection.doSend(HttpConnection.java:157)
... 15 more
[com.getsentry.example.Application.main()] WARN com.getsentry.raven.connection.AbstractConnection - Lockdown started for 20ms.
[com.getsentry.example.Application.main()] WARN com.getsentry.raven.connection.AbstractConnection - Lockdown ended.
[com.getsentry.example.Application.main()] ERROR com.getsentry.raven.Raven - An exception occurred while sending the event to Sentry.
com.getsentry.raven.connection.ConnectionException: An exception occurred while submitting the event to the sentry server.
at com.getsentry.raven.connection.HttpConnection.doSend(HttpConnection.java:175)
at com.getsentry.raven.connection.AbstractConnection.send(AbstractConnection.java:86)
at com.getsentry.raven.Raven.sendEvent(Raven.java:95)
at com.getsentry.raven.log4j.SentryAppender.append(SentryAppender.java:187)
at org.apache.log4j.AppenderSkeleton.doAppend(AppenderSkeleton.java:251)
at org.apache.log4j.helpers.AppenderAttachableImpl.appendLoopOnAppenders(AppenderAttachableImpl.java:66)
at org.apache.log4j.Category.callAppenders(Category.java:206)
at org.apache.log4j.Category.forcedLog(Category.java:391)
at org.apache.log4j.Category.error(Category.java:322)
at com.getsentry.example.Application.main(Application.java:18)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:293)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.io.IOException: This is a fake IOException.
at com.getsentry.raven.connection.HttpConnection.doSend(HttpConnection.java:157)
... 15 more
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment