Removed unnecessary dependencies on org.apache.log4j
[simantics/platform.git] / bundles / org.simantics.diagram / src / org / simantics / diagram / handler / CopyPasteHandler.java
index 52217c3cfcf2b84a6ddc9795d7d13d3f66af80ba..de10603d3bc078257ddc27fd7c0b390915f9baa4 100644 (file)
@@ -44,7 +44,6 @@ import org.simantics.db.layer0.util.SimanticsKeys;
 import org.simantics.db.layer0.variable.Variable;
 import org.simantics.db.layer0.variable.Variables;
 import org.simantics.db.request.Read;
-import org.simantics.diagram.Logger;
 import org.simantics.diagram.content.Change;
 import org.simantics.diagram.content.ConnectionUtil;
 import org.simantics.diagram.content.DiagramContentChanges;
@@ -114,6 +113,8 @@ import org.simantics.utils.threads.SWTThread;
 import org.simantics.utils.threads.ThreadUtils;
 import org.simantics.utils.ui.ErrorLogger;
 import org.simantics.utils.ui.SWTUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * CopyPasteHandler is a canvas handler for Commands.CUT, Commands.COPY and
@@ -141,6 +142,8 @@ import org.simantics.utils.ui.SWTUtils;
  */
 public class CopyPasteHandler extends AbstractDiagramParticipant {
 
+    private static final Logger LOGGER = LoggerFactory.getLogger(CopyPasteHandler.class);
+
     public static final Key KEY_CUT_SELECTION_FRAME_COLOR      = new KeyOf(Color.class, "CUT_SELECTION_FRAME_COLOR");
     public static final Key KEY_CUT_SELECTION_CONTENT_COLOR    = new KeyOf(Color.class, "CUT_SELECTION_CONTENT_COLOR");
     public static final Key KEY_COPIED_SELECTION_FRAME_COLOR   = new KeyOf(Color.class, "COPY_SELECTION_FRAME_COLOR");
@@ -1294,7 +1297,7 @@ public class CopyPasteHandler extends AbstractDiagramParticipant {
                     });
                 }
             } catch (DatabaseException e1) {
-               Logger.defaultLogError(e1);
+                LOGGER.error("Monitor paste failed", e1);
             }
         }
         return true;