Removed unnecessary dependencies on org.apache.log4j
[simantics/platform.git] / bundles / org.simantics.modeling / src / org / simantics / modeling / SCLAction.java
index 47c7d346657d2caa7116a332a5f79860a6fb6e4a..ba7e7117fea1dc28202803be58e7961f6a34266d 100644 (file)
@@ -8,11 +8,14 @@ import org.simantics.db.exception.DatabaseException;
 import org.simantics.db.layer0.adapter.ActionFactory;
 import org.simantics.db.layer0.variable.Variable;
 import org.simantics.db.layer0.variable.Variables;
-import org.simantics.diagram.Logger;
 import org.simantics.scl.runtime.function.Function1;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class SCLAction implements ActionFactory {
 
+       private static final Logger LOGGER = LoggerFactory.getLogger(SCLAction.class);
+
        final private Resource rule;
     
     public SCLAction(ReadGraph graph, Resource rule) throws DatabaseException {
@@ -52,7 +55,7 @@ public class SCLAction implements ActionFactory {
                                Function1<Resource, Object> function = Simantics.getSession().syncRequest(new RuleFunctionRequest(rule));
                                function.apply(resource);
                        } catch (DatabaseException e) {
-                               Logger.defaultLogError(e);
+                               LOGGER.error("SCLActionRunnable failed to request/apply RuleFunction {}", rule, e);
                        }
                }