Kaynağa Gözat

Merge pull request #579 from csmith/master

Make existing Log.error calls use app/user markers.
pull/582/head
Greg Holmes 9 yıl önce
ebeveyn
işleme
5eae2f48b7

+ 5
- 4
src/com/dmdirc/plugins/ExportedService.java Dosyayı Görüntüle

@@ -22,6 +22,8 @@
22 22
 
23 23
 package com.dmdirc.plugins;
24 24
 
25
+import com.dmdirc.util.LogUtils;
26
+
25 27
 import java.lang.reflect.InvocationTargetException;
26 28
 import java.lang.reflect.Method;
27 29
 
@@ -76,10 +78,9 @@ public class ExportedService {
76 78
     public Object execute(final Object... args) {
77 79
         try {
78 80
             return method.invoke(object, args);
79
-        } catch (final LinkageError | IllegalAccessException |
80
-                IllegalArgumentException | InvocationTargetException le) {
81
-            LOG.error("Error with exported service calling {}",
82
-                    method, le);
81
+        } catch (LinkageError | IllegalAccessException | IllegalArgumentException
82
+                | InvocationTargetException le) {
83
+            LOG.error(LogUtils.APP_ERROR, "Error with exported service calling {}", method, le);
83 84
             return null;
84 85
         }
85 86
     }

+ 3
- 1
src/com/dmdirc/updater/checking/DMDircCheckStrategy.java Dosyayı Görüntüle

@@ -28,6 +28,7 @@ import com.dmdirc.interfaces.config.AggregateConfigProvider;
28 28
 import com.dmdirc.updater.UpdateChannel;
29 29
 import com.dmdirc.updater.UpdateComponent;
30 30
 import com.dmdirc.updater.Version;
31
+import com.dmdirc.util.LogUtils;
31 32
 import com.dmdirc.util.io.Downloader;
32 33
 
33 34
 import java.io.IOException;
@@ -200,7 +201,8 @@ public class DMDircCheckStrategy implements UpdateCheckStrategy {
200 201
             return new BaseDownloadableResult(component, new URL(parts[5]),
201 202
                     parts[4], new Version(parts[3]));
202 203
         } catch (MalformedURLException ex) {
203
-            LOG.error("Unable to construct URL for update. Parts: {}", parts, ex);
204
+            LOG.error(LogUtils.APP_ERROR, "Unable to construct URL for update. Parts: {}", parts,
205
+                    ex);
204 206
             return null;
205 207
         }
206 208
     }

+ 1
- 1
src/com/dmdirc/util/BaseYamlStore.java Dosyayı Görüntüle

@@ -94,7 +94,7 @@ public abstract class BaseYamlStore<T> {
94 94
             yamlWriter.write(items.parallelStream().map(this::convertToYaml).collect(toList()));
95 95
             yamlWriter.close();
96 96
         } catch (IOException ex) {
97
-            LOG.error("Unable to write to {}", path, ex);
97
+            LOG.error(LogUtils.USER_ERROR, "Unable to write to {}", path, ex);
98 98
         }
99 99
     }
100 100
 

Loading…
İptal
Kaydet