Browse Source

Fix various issues with raven.

- Upgrade to the latest version, fix compilation errors.
- Include the raven build properties file so it knows its version
- Set up a factory when we initialise the Error Manager
  (in debug builds this works because of a SPI entry in the raven jar)
- Bundle more bits of guava used by raven

Change-Id: I3c858936b62e4a089b19b358a5d8930c1fc54b04
Reviewed-on: http://gerrit.dmdirc.com/3119
Automatic-Compile: DMDirc Build Manager
Reviewed-by: Greg Holmes <greg@dmdirc.com>
tags/0.8rc1
Chris Smith 10 years ago
parent
commit
c40b8f1da4
4 changed files with 13 additions and 4 deletions
  1. 6
    2
      build.xml
  2. 1
    1
      ivy.xml
  3. 5
    0
      src/com/dmdirc/logger/ErrorManager.java
  4. 1
    1
      src/com/dmdirc/logger/ProgramError.java

+ 6
- 2
build.xml View File

@@ -70,8 +70,7 @@
70 70
     <target name="-bundle-raven">
71 71
         <jar destfile="${dist.jar}" update="true">
72 72
             <zipfileset src="lib/main/jackson-core.jar" includes="com/fasterxml/**"/>
73
-            <zipfileset src="lib/main/commons-codec.jar" includes="org/apache/**"/>
74
-            <zipfileset src="lib/main/raven.jar" includes="net/kencochrane/**"/>
73
+            <zipfileset src="lib/main/raven.jar" includes="net/kencochrane/**,raven-build.properties"/>
75 74
         </jar>
76 75
     </target>
77 76
 
@@ -89,7 +88,12 @@
89 88
             -dontnote
90 89
 
91 90
             -keep public class com.google.common.eventbus.* { *; }
91
+            -keep public class com.google.common.base.Charsets { *; }
92
+            -keep public class com.google.common.base.Joiner { *; }
92 93
             -keep public class com.google.common.base.Preconditions { *; }
94
+            -keep public class com.google.common.base.Splitter { *; }
95
+            -keep public class com.google.common.collect.Iterables { *; }
96
+            -keep public class com.google.common.io.BaseEncoding { *; }
93 97
       </proguard>
94 98
 
95 99
       <jar destfile="${dist.jar}" update="true">

+ 1
- 1
ivy.xml View File

@@ -25,7 +25,7 @@
25 25
 
26 26
         <dependency org="net.miginfocom" name="base64" rev="2.2" conf="main->default" />
27 27
 
28
-        <dependency org="net.kencochrane.raven" name="raven" rev="4.0" conf="main->default" />
28
+        <dependency org="net.kencochrane.raven" name="raven" rev="4.+" conf="main->default" />
29 29
 
30 30
         <dependency org="com.google.guava" name="guava" rev="15.+" conf="main->default" />
31 31
 

+ 5
- 0
src/com/dmdirc/logger/ErrorManager.java View File

@@ -37,6 +37,9 @@ import java.util.concurrent.BlockingQueue;
37 37
 import java.util.concurrent.LinkedBlockingQueue;
38 38
 import java.util.concurrent.atomic.AtomicLong;
39 39
 
40
+import net.kencochrane.raven.DefaultRavenFactory;
41
+import net.kencochrane.raven.RavenFactory;
42
+
40 43
 /**
41 44
  * Error manager.
42 45
  */
@@ -86,6 +89,8 @@ public class ErrorManager implements ConfigChangeListener {
86 89
      * @param controller The controller to use to read/write settings.
87 90
      */
88 91
     public void initialise(final IdentityController controller) {
92
+        RavenFactory.registerFactory(new DefaultRavenFactory());
93
+
89 94
         final AggregateConfigProvider config = controller.getGlobalConfiguration();
90 95
 
91 96
         config.addChangeListener("general", "logerrors", this);

+ 1
- 1
src/com/dmdirc/logger/ProgramError.java View File

@@ -48,9 +48,9 @@ import java.util.concurrent.atomic.AtomicInteger;
48 48
 
49 49
 import javax.annotation.Nullable;
50 50
 
51
-import net.kencochrane.raven.Dsn;
52 51
 import net.kencochrane.raven.Raven;
53 52
 import net.kencochrane.raven.RavenFactory;
53
+import net.kencochrane.raven.dsn.Dsn;
54 54
 import net.kencochrane.raven.event.Event;
55 55
 import net.kencochrane.raven.event.EventBuilder;
56 56
 import net.kencochrane.raven.event.interfaces.ExceptionInterface;

Loading…
Cancel
Save