From: Reino Ruusu Date: Wed, 14 Aug 2019 08:50:52 +0000 (+0300) Subject: Switch from org.apache.log4j to org.slf4j. X-Git-Tag: v1.43.0~136^2~116^2 X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=d318a62cad7e8bd2781c32ebec08c52e7d051f98;p=simantics%2Fplatform.git Switch from org.apache.log4j to org.slf4j. gitlab #342 Change-Id: I764df2ecf1e58a1529c0a4e46653054ff15a2de7 --- diff --git a/bundles/org.simantics.objmap2/META-INF/MANIFEST.MF b/bundles/org.simantics.objmap2/META-INF/MANIFEST.MF index 87e9bbfd5..db84bf0c5 100644 --- a/bundles/org.simantics.objmap2/META-INF/MANIFEST.MF +++ b/bundles/org.simantics.objmap2/META-INF/MANIFEST.MF @@ -8,7 +8,6 @@ Require-Bundle: org.simantics.db;bundle-version="1.1.0", gnu.trove3;bundle-version="3.0.0", org.eclipse.core.runtime;bundle-version="3.7.0", org.simantics.layer0;bundle-version="1.0.0", - org.apache.log4j;bundle-version="1.2.15", org.simantics.db.common;bundle-version="1.1.0", org.simantics.structural.ontology;bundle-version="1.1.0", org.slf4j.api diff --git a/bundles/org.simantics.objmap2/src/org/simantics/objmap/graph/annotations/factories/UpdateMethodFactory.java b/bundles/org.simantics.objmap2/src/org/simantics/objmap/graph/annotations/factories/UpdateMethodFactory.java index 10f64be78..b20117626 100644 --- a/bundles/org.simantics.objmap2/src/org/simantics/objmap/graph/annotations/factories/UpdateMethodFactory.java +++ b/bundles/org.simantics.objmap2/src/org/simantics/objmap/graph/annotations/factories/UpdateMethodFactory.java @@ -14,7 +14,8 @@ package org.simantics.objmap.graph.annotations.factories; import java.lang.annotation.Annotation; import java.lang.reflect.Method; -import org.apache.log4j.Logger; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.simantics.db.ReadGraph; import org.simantics.db.WriteGraph; import org.simantics.db.exception.DatabaseException; @@ -26,7 +27,7 @@ import org.simantics.objmap.graph.rules.factory.IMethodRuleFactory; public class UpdateMethodFactory implements IMethodRuleFactory { - static Logger LOGGER = Logger.getLogger("org.simantics.objmap"); + static Logger LOGGER = LoggerFactory.getLogger(UpdateMethodFactory.class); @Override public IBidirectionalMappingRule create(ReadGraph g, diff --git a/bundles/org.simantics.objmap2/src/org/simantics/objmap/graph/impl/Mapping.java b/bundles/org.simantics.objmap2/src/org/simantics/objmap/graph/impl/Mapping.java index f105a2894..9f048f775 100644 --- a/bundles/org.simantics.objmap2/src/org/simantics/objmap/graph/impl/Mapping.java +++ b/bundles/org.simantics.objmap2/src/org/simantics/objmap/graph/impl/Mapping.java @@ -21,7 +21,8 @@ import java.util.Iterator; import java.util.List; import java.util.Set; -import org.apache.log4j.Logger; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.simantics.db.ReadGraph; import org.simantics.db.WriteGraph; import org.simantics.db.exception.DatabaseException; @@ -42,7 +43,7 @@ import org.simantics.objmap.graph.schema.IMappingSchema; */ public class Mapping implements IMapping { - static Logger LOGGER = Logger.getLogger("org.simantics.objmap"); + static final Logger LOGGER = LoggerFactory.getLogger(Mapping.class); IMappingSchema schema; diff --git a/bundles/org.simantics.objmap2/src/org/simantics/objmap/graph/rules/MappedElementRule.java b/bundles/org.simantics.objmap2/src/org/simantics/objmap/graph/rules/MappedElementRule.java index 3b6fac31d..5e4eec39f 100644 --- a/bundles/org.simantics.objmap2/src/org/simantics/objmap/graph/rules/MappedElementRule.java +++ b/bundles/org.simantics.objmap2/src/org/simantics/objmap/graph/rules/MappedElementRule.java @@ -11,7 +11,6 @@ *******************************************************************************/ package org.simantics.objmap.graph.rules; -import org.apache.log4j.Logger; import org.simantics.db.ReadGraph; import org.simantics.db.WriteGraph; import org.simantics.objmap.backward.IBackwardMapping; @@ -20,9 +19,8 @@ import org.simantics.objmap.exceptions.MappingException; import org.simantics.objmap.forward.IForwardMapping; import org.simantics.objmap.graph.rules.domain.IDomainAccessor; import org.simantics.objmap.graph.rules.range.IRangeAccessor; - - - +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * A rule that synchronizes collection of elements between @@ -32,7 +30,7 @@ import org.simantics.objmap.graph.rules.range.IRangeAccessor; */ public class MappedElementRule implements IBidirectionalMappingRule { - static Logger LOGGER = Logger.getLogger("org.simantics.objmap"); + static final Logger LOGGER = LoggerFactory.getLogger(MappedElementRule.class); IDomainAccessor domainAccessor; IRangeAccessor rangeAccessor; diff --git a/bundles/org.simantics.objmap2/src/org/simantics/objmap/graph/rules/MappedElementsRule.java b/bundles/org.simantics.objmap2/src/org/simantics/objmap/graph/rules/MappedElementsRule.java index cd295e583..43a8ff493 100644 --- a/bundles/org.simantics.objmap2/src/org/simantics/objmap/graph/rules/MappedElementsRule.java +++ b/bundles/org.simantics.objmap2/src/org/simantics/objmap/graph/rules/MappedElementsRule.java @@ -14,7 +14,6 @@ package org.simantics.objmap.graph.rules; import java.util.ArrayList; import java.util.Collection; -import org.apache.log4j.Logger; import org.simantics.db.ReadGraph; import org.simantics.db.WriteGraph; import org.simantics.objmap.backward.IBackwardMapping; @@ -23,6 +22,8 @@ import org.simantics.objmap.exceptions.MappingException; import org.simantics.objmap.forward.IForwardMapping; import org.simantics.objmap.graph.rules.domain.IDomainAccessor; import org.simantics.objmap.graph.rules.range.IRangeAccessor; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** @@ -33,7 +34,7 @@ import org.simantics.objmap.graph.rules.range.IRangeAccessor; */ public class MappedElementsRule implements IBidirectionalMappingRule { - static Logger LOGGER = Logger.getLogger("org.simantics.objmap"); + static final Logger LOGGER = LoggerFactory.getLogger(MappedElementsRule.class); IDomainAccessor> domainAccessor; IRangeAccessor> rangeAccessor; diff --git a/bundles/org.simantics.objmap2/src/org/simantics/objmap/graph/rules/ValueRule.java b/bundles/org.simantics.objmap2/src/org/simantics/objmap/graph/rules/ValueRule.java index 718bc7c2d..d40c44f2b 100644 --- a/bundles/org.simantics.objmap2/src/org/simantics/objmap/graph/rules/ValueRule.java +++ b/bundles/org.simantics.objmap2/src/org/simantics/objmap/graph/rules/ValueRule.java @@ -11,7 +11,8 @@ *******************************************************************************/ package org.simantics.objmap.graph.rules; -import org.apache.log4j.Logger; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.simantics.db.ReadGraph; import org.simantics.db.WriteGraph; import org.simantics.objmap.backward.IBackwardMapping; @@ -29,7 +30,7 @@ import org.simantics.objmap.graph.rules.range.IRangeAccessor; */ public class ValueRule implements IBidirectionalMappingRule { - static Logger LOGGER = Logger.getLogger("org.simantics.objmap"); + static Logger LOGGER = LoggerFactory.getLogger(ValueRule.class); IDomainAccessor domainAccessor; IRangeAccessor rangeAccessor; diff --git a/bundles/org.simantics.objmap2/src/org/simantics/objmap/graph/rules/domain/CompoundValueAccessor.java b/bundles/org.simantics.objmap2/src/org/simantics/objmap/graph/rules/domain/CompoundValueAccessor.java index 78b484303..1c7e267c7 100644 --- a/bundles/org.simantics.objmap2/src/org/simantics/objmap/graph/rules/domain/CompoundValueAccessor.java +++ b/bundles/org.simantics.objmap2/src/org/simantics/objmap/graph/rules/domain/CompoundValueAccessor.java @@ -16,7 +16,6 @@ import java.util.Collection; import java.util.HashMap; import java.util.Map; -import org.apache.log4j.Logger; import org.simantics.db.ReadGraph; import org.simantics.db.Resource; import org.simantics.db.Statement; @@ -25,6 +24,8 @@ import org.simantics.db.exception.DatabaseException; import org.simantics.layer0.Layer0; import org.simantics.objmap.exceptions.MappingException; import org.simantics.objmap.graph.annotations.factories.CompoundRelatedGetSetValueRuleFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @@ -32,7 +33,7 @@ import org.simantics.objmap.graph.annotations.factories.CompoundRelatedGetSetVal */ public class CompoundValueAccessor implements IDomainAccessor { - static Logger LOGGER = Logger.getLogger("org.simantics.objmap"); + static final Logger LOGGER = LoggerFactory.getLogger(CompoundValueAccessor.class); Resource objRelation; Resource objType; diff --git a/bundles/org.simantics.objmap2/src/org/simantics/objmap/graph/rules/domain/MappingUtils.java b/bundles/org.simantics.objmap2/src/org/simantics/objmap/graph/rules/domain/MappingUtils.java index a0d0d4dac..dbda44e34 100644 --- a/bundles/org.simantics.objmap2/src/org/simantics/objmap/graph/rules/domain/MappingUtils.java +++ b/bundles/org.simantics.objmap2/src/org/simantics/objmap/graph/rules/domain/MappingUtils.java @@ -14,7 +14,8 @@ package org.simantics.objmap.graph.rules.domain; import java.util.Arrays; import java.util.Collection; -import org.apache.log4j.Logger; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.simantics.db.Resource; import org.simantics.db.WriteGraph; import org.simantics.db.exception.DatabaseException; @@ -25,7 +26,7 @@ import org.simantics.db.exception.DatabaseException; */ public class MappingUtils { - static Logger LOGGER = Logger.getLogger("org.simantics.objmap"); + static final Logger LOGGER = LoggerFactory.getLogger(MappingUtils.class); /** * Adds and removes statements to/from the database so that objects diff --git a/bundles/org.simantics.objmap2/src/org/simantics/objmap/graph/rules/domain/RelatedObjectAccessor.java b/bundles/org.simantics.objmap2/src/org/simantics/objmap/graph/rules/domain/RelatedObjectAccessor.java index 99253790c..2cfc98185 100644 --- a/bundles/org.simantics.objmap2/src/org/simantics/objmap/graph/rules/domain/RelatedObjectAccessor.java +++ b/bundles/org.simantics.objmap2/src/org/simantics/objmap/graph/rules/domain/RelatedObjectAccessor.java @@ -11,7 +11,8 @@ *******************************************************************************/ package org.simantics.objmap.graph.rules.domain; -import org.apache.log4j.Logger; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.simantics.db.ReadGraph; import org.simantics.db.Resource; import org.simantics.db.WriteGraph; @@ -24,7 +25,7 @@ import org.simantics.objmap.exceptions.MappingException; */ public class RelatedObjectAccessor implements IDomainAccessor { - static Logger LOGGER = Logger.getLogger("org.simantics.objmap"); + static Logger LOGGER = LoggerFactory.getLogger(RelatedObjectAccessor.class); Resource relation; diff --git a/bundles/org.simantics.objmap2/src/org/simantics/objmap/graph/rules/domain/RelatedObjectsAccessor.java b/bundles/org.simantics.objmap2/src/org/simantics/objmap/graph/rules/domain/RelatedObjectsAccessor.java index 9653ab370..d8002d976 100644 --- a/bundles/org.simantics.objmap2/src/org/simantics/objmap/graph/rules/domain/RelatedObjectsAccessor.java +++ b/bundles/org.simantics.objmap2/src/org/simantics/objmap/graph/rules/domain/RelatedObjectsAccessor.java @@ -13,7 +13,8 @@ package org.simantics.objmap.graph.rules.domain; import java.util.Collection; -import org.apache.log4j.Logger; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.simantics.db.ReadGraph; import org.simantics.db.Resource; import org.simantics.db.WriteGraph; @@ -26,7 +27,7 @@ import org.simantics.objmap.exceptions.MappingException; */ public class RelatedObjectsAccessor implements IDomainAccessor> { - static Logger LOGGER = Logger.getLogger("org.simantics.objmap"); + static Logger LOGGER = LoggerFactory.getLogger(RelatedObjectsAccessor.class); Resource relation; boolean deleteExtraObjects; diff --git a/bundles/org.simantics.objmap2/src/org/simantics/objmap/graph/rules/domain/RelatedOrderedSetElementsAccessor.java b/bundles/org.simantics.objmap2/src/org/simantics/objmap/graph/rules/domain/RelatedOrderedSetElementsAccessor.java index c033751e5..a272b4f0b 100644 --- a/bundles/org.simantics.objmap2/src/org/simantics/objmap/graph/rules/domain/RelatedOrderedSetElementsAccessor.java +++ b/bundles/org.simantics.objmap2/src/org/simantics/objmap/graph/rules/domain/RelatedOrderedSetElementsAccessor.java @@ -13,7 +13,8 @@ package org.simantics.objmap.graph.rules.domain; import java.util.Collection; -import org.apache.log4j.Logger; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.simantics.db.ReadGraph; import org.simantics.db.Resource; import org.simantics.db.WriteGraph; @@ -27,7 +28,7 @@ import org.simantics.objmap.exceptions.MappingException; */ public class RelatedOrderedSetElementsAccessor implements IDomainAccessor> { - static Logger LOGGER = Logger.getLogger("org.simantics.objmap"); + static Logger LOGGER = LoggerFactory.getLogger(RelatedOrderedSetElementsAccessor.class); boolean deleteExtraObjects; diff --git a/bundles/org.simantics.objmap2/src/org/simantics/objmap/graph/rules/domain/RelatedValueAccessor.java b/bundles/org.simantics.objmap2/src/org/simantics/objmap/graph/rules/domain/RelatedValueAccessor.java index d5ad40b77..9ede88177 100644 --- a/bundles/org.simantics.objmap2/src/org/simantics/objmap/graph/rules/domain/RelatedValueAccessor.java +++ b/bundles/org.simantics.objmap2/src/org/simantics/objmap/graph/rules/domain/RelatedValueAccessor.java @@ -13,7 +13,8 @@ package org.simantics.objmap.graph.rules.domain; import java.util.Arrays; -import org.apache.log4j.Logger; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.simantics.db.ReadGraph; import org.simantics.db.Resource; import org.simantics.db.Statement; @@ -28,7 +29,7 @@ import org.simantics.objmap.exceptions.MappingException; */ public class RelatedValueAccessor implements IDomainAccessor { - static Logger LOGGER = Logger.getLogger("org.simantics.objmap"); + static Logger LOGGER = LoggerFactory.getLogger(RelatedValueAccessor.class); Resource relation; Resource valueType; diff --git a/bundles/org.simantics.objmap2/src/org/simantics/objmap/graph/rules/range/FieldAccessor.java b/bundles/org.simantics.objmap2/src/org/simantics/objmap/graph/rules/range/FieldAccessor.java index 6615e94fb..278c35a89 100644 --- a/bundles/org.simantics.objmap2/src/org/simantics/objmap/graph/rules/range/FieldAccessor.java +++ b/bundles/org.simantics.objmap2/src/org/simantics/objmap/graph/rules/range/FieldAccessor.java @@ -13,8 +13,9 @@ package org.simantics.objmap.graph.rules.range; import java.lang.reflect.Field; -import org.apache.log4j.Logger; import org.simantics.objmap.exceptions.MappingException; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** @@ -23,7 +24,7 @@ import org.simantics.objmap.exceptions.MappingException; */ public class FieldAccessor implements IRangeAccessor { - static Logger LOGGER = Logger.getLogger("org.simantics.objmap"); + static final Logger LOGGER = LoggerFactory.getLogger(FieldAccessor.class); Field field; diff --git a/bundles/org.simantics.objmap2/src/org/simantics/objmap/graph/schema/AdaptedLinkType.java b/bundles/org.simantics.objmap2/src/org/simantics/objmap/graph/schema/AdaptedLinkType.java index 046a744cf..9b02d5d50 100644 --- a/bundles/org.simantics.objmap2/src/org/simantics/objmap/graph/schema/AdaptedLinkType.java +++ b/bundles/org.simantics.objmap2/src/org/simantics/objmap/graph/schema/AdaptedLinkType.java @@ -11,7 +11,7 @@ *******************************************************************************/ package org.simantics.objmap.graph.schema; -//import org.apache.log4j.Logger; +//import org.slf4j.Logger; import org.eclipse.core.runtime.IAdaptable; import org.simantics.db.ReadGraph; import org.simantics.db.Resource; diff --git a/bundles/org.simantics.objmap2/src/org/simantics/objmap/graph/schema/SimpleLinkType.java b/bundles/org.simantics.objmap2/src/org/simantics/objmap/graph/schema/SimpleLinkType.java index fcfb3b012..1de0e31fa 100644 --- a/bundles/org.simantics.objmap2/src/org/simantics/objmap/graph/schema/SimpleLinkType.java +++ b/bundles/org.simantics.objmap2/src/org/simantics/objmap/graph/schema/SimpleLinkType.java @@ -13,7 +13,8 @@ package org.simantics.objmap.graph.schema; import java.util.ArrayList; -import org.apache.log4j.Logger; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.simantics.db.ReadGraph; import org.simantics.db.Resource; import org.simantics.db.WriteGraph; @@ -34,7 +35,7 @@ import org.simantics.objmap.forward.IForwardMapping; */ public class SimpleLinkType implements ILinkType { - static Logger LOGGER = Logger.getLogger("org.simantics.objmap"); + static Logger LOGGER = LoggerFactory.getLogger(SimpleLinkType.class); public Resource domainType; public Class rangeType; diff --git a/bundles/org.simantics.objmap2/src/org/simantics/objmap/structural/annotations/factories/UpdateMethodFactory.java b/bundles/org.simantics.objmap2/src/org/simantics/objmap/structural/annotations/factories/UpdateMethodFactory.java index a5dc78f91..1ce1ef1c6 100644 --- a/bundles/org.simantics.objmap2/src/org/simantics/objmap/structural/annotations/factories/UpdateMethodFactory.java +++ b/bundles/org.simantics.objmap2/src/org/simantics/objmap/structural/annotations/factories/UpdateMethodFactory.java @@ -14,7 +14,8 @@ package org.simantics.objmap.structural.annotations.factories; import java.lang.annotation.Annotation; import java.lang.reflect.Method; -import org.apache.log4j.Logger; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.simantics.db.ReadGraph; import org.simantics.db.WriteGraph; import org.simantics.db.exception.DatabaseException; @@ -26,7 +27,7 @@ import org.simantics.objmap.graph.rules.factory.IMethodRuleFactory; public class UpdateMethodFactory implements IMethodRuleFactory { - static Logger LOGGER = Logger.getLogger("org.simantics.objmap"); + static Logger LOGGER = LoggerFactory.getLogger(UpdateMethodFactory.class); @Override public IBidirectionalMappingRule create(ReadGraph g, diff --git a/bundles/org.simantics.objmap2/src/org/simantics/objmap/structural/rules/domain/RelatedObjectAccessor.java b/bundles/org.simantics.objmap2/src/org/simantics/objmap/structural/rules/domain/RelatedObjectAccessor.java index 295e60e2f..736f86b39 100644 --- a/bundles/org.simantics.objmap2/src/org/simantics/objmap/structural/rules/domain/RelatedObjectAccessor.java +++ b/bundles/org.simantics.objmap2/src/org/simantics/objmap/structural/rules/domain/RelatedObjectAccessor.java @@ -11,7 +11,8 @@ *******************************************************************************/ package org.simantics.objmap.structural.rules.domain; -import org.apache.log4j.Logger; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.simantics.db.ReadGraph; import org.simantics.db.Resource; import org.simantics.db.WriteGraph; @@ -23,7 +24,7 @@ import org.simantics.objmap.structural.StructuralResource; public class RelatedObjectAccessor implements IDomainAccessor { - static Logger LOGGER = Logger.getLogger("org.simantics.objmap"); + static Logger LOGGER = LoggerFactory.getLogger(RelatedObjectAccessor.class); Resource relation; boolean useTypeResource; diff --git a/bundles/org.simantics.objmap2/src/org/simantics/objmap/structural/rules/domain/RelatedObjectsAccessor.java b/bundles/org.simantics.objmap2/src/org/simantics/objmap/structural/rules/domain/RelatedObjectsAccessor.java index cbd4ef3b4..1e1be5b76 100644 --- a/bundles/org.simantics.objmap2/src/org/simantics/objmap/structural/rules/domain/RelatedObjectsAccessor.java +++ b/bundles/org.simantics.objmap2/src/org/simantics/objmap/structural/rules/domain/RelatedObjectsAccessor.java @@ -16,7 +16,8 @@ import java.util.Collection; import java.util.Collections; import java.util.List; -import org.apache.log4j.Logger; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.simantics.db.ReadGraph; import org.simantics.db.Resource; import org.simantics.db.WriteGraph; @@ -29,7 +30,7 @@ import org.simantics.objmap.structural.StructuralResource; public class RelatedObjectsAccessor implements IDomainAccessor> { - static Logger LOGGER = Logger.getLogger("org.simantics.objmap"); + static Logger LOGGER = LoggerFactory.getLogger(RelatedObjectsAccessor.class); Resource relation; boolean deleteExtraObjects; diff --git a/bundles/org.simantics.objmap2/src/org/simantics/objmap/structural/rules/domain/RelatedOrderedSetElementsAccessor.java b/bundles/org.simantics.objmap2/src/org/simantics/objmap/structural/rules/domain/RelatedOrderedSetElementsAccessor.java index 6c1ed3aa2..97fde226f 100644 --- a/bundles/org.simantics.objmap2/src/org/simantics/objmap/structural/rules/domain/RelatedOrderedSetElementsAccessor.java +++ b/bundles/org.simantics.objmap2/src/org/simantics/objmap/structural/rules/domain/RelatedOrderedSetElementsAccessor.java @@ -16,7 +16,8 @@ import java.util.Collection; import java.util.Collections; import java.util.List; -import org.apache.log4j.Logger; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.simantics.db.ReadGraph; import org.simantics.db.Resource; import org.simantics.db.WriteGraph; @@ -28,7 +29,7 @@ import org.simantics.objmap.structural.StructuralResource; public class RelatedOrderedSetElementsAccessor implements IDomainAccessor> { - static Logger LOGGER = Logger.getLogger("org.simantics.objmap"); + static Logger LOGGER = LoggerFactory.getLogger(RelatedOrderedSetElementsAccessor.class); boolean deleteExtraObjects; boolean useTypeResource; diff --git a/bundles/org.simantics.objmap2/src/org/simantics/objmap/structural/rules/domain/RelatedValueAccessor.java b/bundles/org.simantics.objmap2/src/org/simantics/objmap/structural/rules/domain/RelatedValueAccessor.java index 2d3a24230..41279d1ab 100644 --- a/bundles/org.simantics.objmap2/src/org/simantics/objmap/structural/rules/domain/RelatedValueAccessor.java +++ b/bundles/org.simantics.objmap2/src/org/simantics/objmap/structural/rules/domain/RelatedValueAccessor.java @@ -13,7 +13,8 @@ package org.simantics.objmap.structural.rules.domain; import java.util.Arrays; -import org.apache.log4j.Logger; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.simantics.db.ReadGraph; import org.simantics.db.Resource; import org.simantics.db.Statement; @@ -27,7 +28,7 @@ import org.simantics.objmap.structural.StructuralResource; public class RelatedValueAccessor implements IDomainAccessor { - static Logger LOGGER = Logger.getLogger("org.simantics.objmap"); + static Logger LOGGER = LoggerFactory.getLogger(RelatedValueAccessor.class); Resource relation; Resource valueType; diff --git a/bundles/org.simantics.objmap2/src/org/simantics/objmap/structural/rules/domain/StructuralRelatedObjectAccessor.java b/bundles/org.simantics.objmap2/src/org/simantics/objmap/structural/rules/domain/StructuralRelatedObjectAccessor.java index 32b8fd38c..865d4249e 100644 --- a/bundles/org.simantics.objmap2/src/org/simantics/objmap/structural/rules/domain/StructuralRelatedObjectAccessor.java +++ b/bundles/org.simantics.objmap2/src/org/simantics/objmap/structural/rules/domain/StructuralRelatedObjectAccessor.java @@ -14,7 +14,8 @@ package org.simantics.objmap.structural.rules.domain; import java.util.ArrayList; import java.util.List; -import org.apache.log4j.Logger; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.simantics.db.ReadGraph; import org.simantics.db.Resource; import org.simantics.db.WriteGraph; @@ -26,7 +27,7 @@ import org.simantics.objmap.structural.StructuralResource; public class StructuralRelatedObjectAccessor implements IDomainAccessor { - static Logger LOGGER = Logger.getLogger("org.simantics.objmap"); + static Logger LOGGER = LoggerFactory.getLogger(StructuralRelatedObjectAccessor.class); Resource relation; boolean useTypeResource; diff --git a/bundles/org.simantics.objmap2/src/org/simantics/objmap/structural/rules/domain/StructuralRelatedObjectsAccessor.java b/bundles/org.simantics.objmap2/src/org/simantics/objmap/structural/rules/domain/StructuralRelatedObjectsAccessor.java index 730edc269..6984bdcd0 100644 --- a/bundles/org.simantics.objmap2/src/org/simantics/objmap/structural/rules/domain/StructuralRelatedObjectsAccessor.java +++ b/bundles/org.simantics.objmap2/src/org/simantics/objmap/structural/rules/domain/StructuralRelatedObjectsAccessor.java @@ -16,7 +16,8 @@ import java.util.Collection; import java.util.Collections; import java.util.List; -import org.apache.log4j.Logger; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.simantics.db.ReadGraph; import org.simantics.db.Resource; import org.simantics.db.WriteGraph; @@ -29,7 +30,7 @@ import org.simantics.objmap.structural.StructuralResource; public class StructuralRelatedObjectsAccessor implements IDomainAccessor> { - static Logger LOGGER = Logger.getLogger("org.simantics.objmap"); + static Logger LOGGER = LoggerFactory.getLogger(StructuralRelatedObjectsAccessor.class); Resource relation; boolean deleteExtraObjects; diff --git a/bundles/org.simantics.objmap2/src/org/simantics/objmap/structural/schema/AdaptedLinkType.java b/bundles/org.simantics.objmap2/src/org/simantics/objmap/structural/schema/AdaptedLinkType.java index 4f5508486..203863a6c 100644 --- a/bundles/org.simantics.objmap2/src/org/simantics/objmap/structural/schema/AdaptedLinkType.java +++ b/bundles/org.simantics.objmap2/src/org/simantics/objmap/structural/schema/AdaptedLinkType.java @@ -11,7 +11,7 @@ *******************************************************************************/ package org.simantics.objmap.structural.schema; -//import org.apache.log4j.Logger; +//import org.slf4j.Logger; import org.eclipse.core.runtime.IAdaptable; import org.simantics.db.ReadGraph; import org.simantics.db.Resource; diff --git a/bundles/org.simantics.objmap2/src/org/simantics/objmap/structural/schema/SimpleLinkType.java b/bundles/org.simantics.objmap2/src/org/simantics/objmap/structural/schema/SimpleLinkType.java index 8a7091fd4..ded0f40db 100644 --- a/bundles/org.simantics.objmap2/src/org/simantics/objmap/structural/schema/SimpleLinkType.java +++ b/bundles/org.simantics.objmap2/src/org/simantics/objmap/structural/schema/SimpleLinkType.java @@ -15,7 +15,8 @@ import java.util.ArrayList; import java.util.Collections; import java.util.List; -import org.apache.log4j.Logger; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.simantics.db.ReadGraph; import org.simantics.db.Resource; import org.simantics.db.WriteGraph; @@ -34,7 +35,7 @@ import org.simantics.objmap.structural.StructuralResource; public class SimpleLinkType implements ILinkType { - static Logger LOGGER = Logger.getLogger("org.simantics.objmap"); + static Logger LOGGER = LoggerFactory.getLogger(SimpleLinkType.class); public Resource domainType; public Class rangeType;