浏览代码

Fix a couple of missing Markers.

pull/419/head
Greg Holmes 9 年前
父节点
当前提交
58754384f1

+ 3
- 1
ui_swing/src/com/dmdirc/addons/ui_swing/components/LoggingSwingWorker.java 查看文件

@@ -29,6 +29,8 @@ import javax.swing.SwingWorker;
29 29
 import org.slf4j.Logger;
30 30
 import org.slf4j.LoggerFactory;
31 31
 
32
+import static com.dmdirc.util.LogUtils.APP_ERROR;
33
+
32 34
 /**
33 35
  * Logging swing worker.
34 36
  *
@@ -49,7 +51,7 @@ public abstract class LoggingSwingWorker<T, V> extends SwingWorker<T, V> {
49 51
         } catch (InterruptedException ex) {
50 52
             //Ignore
51 53
         } catch (ExecutionException ex) {
52
-            LOG.warn(ex.getMessage(), ex);
54
+            LOG.warn(APP_ERROR, ex.getMessage(), ex);
53 55
         }
54 56
     }
55 57
 

+ 3
- 1
ui_swing/src/com/dmdirc/addons/ui_swing/components/SupplierLoggingSwingWorker.java 查看文件

@@ -30,6 +30,8 @@ import java.util.function.Supplier;
30 30
 import org.slf4j.Logger;
31 31
 import org.slf4j.LoggerFactory;
32 32
 
33
+import static com.dmdirc.util.LogUtils.USER_ERROR;
34
+
33 35
 /**
34 36
  * {@link LoggingSwingWorker} that runs a {@link Supplier}.
35 37
  */
@@ -96,7 +98,7 @@ public class SupplierLoggingSwingWorker<T, V> extends LoggingSwingWorker<T, V> {
96 98
         } catch (InterruptedException ex) {
97 99
             //Ignore
98 100
         } catch (ExecutionException ex) {
99
-            LOG.warn(ex.getMessage(), ex);
101
+            LOG.warn(USER_ERROR, ex.getMessage(), ex);
100 102
         }
101 103
     }
102 104
 

+ 3
- 2
ui_swing/src/com/dmdirc/addons/ui_swing/dialogs/prefs/PrefsCategoryLoader.java 查看文件

@@ -30,7 +30,6 @@ import com.dmdirc.addons.ui_swing.components.text.TextLabel;
30 30
 import com.dmdirc.config.prefs.PreferencesCategory;
31 31
 import com.dmdirc.config.prefs.PreferencesSetting;
32 32
 import com.dmdirc.config.prefs.PreferencesType;
33
-import com.dmdirc.util.LogUtils;
34 33
 
35 34
 import java.awt.Component;
36 35
 import java.awt.MenuContainer;
@@ -48,6 +47,8 @@ import net.miginfocom.swing.MigLayout;
48 47
 import org.slf4j.Logger;
49 48
 import org.slf4j.LoggerFactory;
50 49
 
50
+import static com.dmdirc.util.LogUtils.USER_ERROR;
51
+
51 52
 /**
52 53
  * Loads a preferences panel for a specified preferences category in the background.
53 54
  */
@@ -112,7 +113,7 @@ public class PrefsCategoryLoader extends LoggingSwingWorker<JPanel, Object> {
112 113
         } catch (InterruptedException ex) {
113 114
             panel = errorCategory;
114 115
         } catch (ExecutionException ex) {
115
-            LOG.warn(LogUtils.USER_ERROR, "Error loading prefs panel", ex);
116
+            LOG.warn(USER_ERROR, "Error loading prefs panel", ex);
116 117
             panel = errorCategory;
117 118
         }
118 119
         return panel;

正在加载...
取消
保存