Skip to content

Commit

Permalink
Merge pull request #163 from vitruv-tools/cleanup-log4j
Browse files Browse the repository at this point in the history
cleanup remaining old log4j references
  • Loading branch information
larsk21 authored Jan 22, 2025
2 parents 9f24744 + 7cef6e4 commit 6e5e076
Show file tree
Hide file tree
Showing 13 changed files with 36 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ package tools.vitruv.dsls.commonalities.generator.intermediatemodel

import edu.kit.ipd.sdq.activextendannotations.Lazy
import java.util.Collections
import org.apache.log4j.Logger
import org.apache.logging.log4j.Logger
import org.apache.logging.log4j.LogManager
import org.eclipse.emf.codegen.ecore.generator.Generator
import org.eclipse.emf.codegen.ecore.generator.GeneratorAdapterFactory
import org.eclipse.emf.codegen.ecore.genmodel.GenJDKLevel
Expand Down Expand Up @@ -33,7 +34,7 @@ import org.eclipse.core.runtime.Platform

@GenerationScoped
class IntermediateMetamodelCodeGenerator implements SubGenerator {
static val Logger log = Logger.getLogger(IntermediateMetamodelCodeGenerator)
static val Logger log = LogManager.getLogger(IntermediateMetamodelCodeGenerator)
static val GENERATED_CODE_COMPLIANCE_LEVEL = GenJDKLevel.JDK80_LITERAL
static val GENERATED_CODE_FOLDER = "."
static val INTERMEDIATEMODELBASE_GENMODEL_URI = EcorePlugin.getEPackageNsURIToGenModelLocationMap(true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ import java.util.ArrayList
import java.util.HashSet
import java.util.List
import java.util.function.Consumer
import org.apache.log4j.Logger
import org.apache.logging.log4j.Logger
import org.apache.logging.log4j.LogManager
import org.eclipse.emf.common.util.URI
import org.eclipse.emf.ecore.EDataType
import org.eclipse.emf.ecore.EObject
Expand Down Expand Up @@ -36,7 +37,7 @@ import tools.vitruv.dsls.commonalities.language.elements.LeastSpecificType

@GenerationScoped
class IntermediateMetamodelGenerator implements SubGenerator {
static val Logger log = Logger.getLogger(IntermediateMetamodelGenerator)
static val Logger log = LogManager.getLogger(IntermediateMetamodelGenerator)
static val NS_URI_PREFIX = URI.createURI('http://vitruv.tools/commonalities')

@Inject extension GenerationContext generationContext
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ package tools.vitruv.dsls.commonalities.generator.reactions

import com.google.inject.Inject
import com.google.inject.Provider
import org.apache.log4j.Logger
import org.apache.logging.log4j.Logger
import org.apache.logging.log4j.LogManager
import org.eclipse.emf.common.util.URI
import org.eclipse.xtext.resource.IGlobalServiceProvider
import tools.vitruv.dsls.commonalities.generator.SubGenerator
Expand All @@ -25,7 +26,7 @@ import static extension tools.vitruv.dsls.commonalities.generator.reactions.Reac
* code to transform changes between a commonality and its participations.
*/
class ReactionsGenerator implements SubGenerator {
static val Logger logger = Logger.getLogger(ReactionsGenerator)
static val Logger logger = LogManager.getLogger(ReactionsGenerator)

@Inject IGlobalServiceProvider globalServiceProvider
@Inject Provider<IReactionsGenerator> reactionsGeneratorProvider
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
package tools.vitruv.dsls.commonalities.generator.reactions.matching

import com.google.inject.Inject
import org.apache.log4j.Logger
import org.apache.logging.log4j.Logger
import org.apache.logging.log4j.LogManager
import tools.vitruv.dsls.commonalities.generator.reactions.ReactionsSubGenerator
import tools.vitruv.dsls.commonalities.generator.util.guice.InjectingFactoryBase
import tools.vitruv.dsls.commonalities.language.Participation
Expand All @@ -17,7 +18,7 @@ import static extension tools.vitruv.dsls.commonalities.participation.Participat
*/
class MatchParticipationReactionsBuilder extends ReactionsSubGenerator {

static val Logger logger = Logger.getLogger(MatchParticipationReactionsBuilder)
static val Logger logger = LogManager.getLogger(MatchParticipationReactionsBuilder)

static class Factory extends InjectingFactoryBase {
def createFor(Participation participation) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ package tools.vitruv.dsls.commonalities.generator.reactions.matching
import com.google.inject.Inject
import java.util.HashMap
import java.util.Map
import org.apache.log4j.Logger
import org.apache.logging.log4j.Logger
import org.apache.logging.log4j.LogManager
import org.eclipse.emf.ecore.EcorePackage
import org.eclipse.xtext.xbase.XbaseFactory
import tools.vitruv.dsls.commonalities.generator.helper.ContainmentHelper
Expand Down Expand Up @@ -144,7 +145,7 @@ import tools.vitruv.dsls.commonalities.runtime.resources.ResourcesPackage
*/
class ParticipationMatchingReactionsBuilder extends ReactionsGenerationHelper {

static val Logger logger = Logger.getLogger(ParticipationMatchingReactionsBuilder)
static val Logger logger = LogManager.getLogger(ParticipationMatchingReactionsBuilder)

static class Provider extends ReactionsSegmentScopedProvider<ParticipationMatchingReactionsBuilder> {
protected override createFor(FluentReactionsSegmentBuilder segment) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ package tools.vitruv.dsls.commonalities.runtime.matching
import edu.kit.ipd.sdq.commons.util.java.lang.StringUtil
import java.util.Collections
import java.util.Objects
import org.apache.log4j.Logger
import org.apache.logging.log4j.Logger
import org.apache.logging.log4j.LogManager
import org.eclipse.emf.ecore.EClass
import org.eclipse.emf.ecore.EObject
import tools.vitruv.dsls.commonalities.runtime.intermediatemodelbase.Intermediate
Expand All @@ -23,7 +24,7 @@ import tools.vitruv.dsls.reactions.runtime.correspondence.ReactionsCorrespondenc
*/
class ParticipationMatcher {

val static Logger logger = Logger.getLogger(ParticipationMatcher)
val static Logger logger = LogManager.getLogger(ParticipationMatcher)

val ContainmentContext containmentContext
val EObject startObject
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@ package tools.vitruv.dsls.commonalities.runtime.operators.participation.conditio

import java.util.List
import java.util.Objects
import org.apache.log4j.Logger
import org.apache.logging.log4j.Logger
import org.apache.logging.log4j.LogManager
import tools.vitruv.dsls.commonalities.runtime.operators.AttributeOperand

@ParticipationConditionOperator(name = '=')
class EqualsOperator extends AbstractSingleArgumentConditionOperator {

static val Logger logger = Logger.getLogger(EqualsOperator)
static val Logger logger = LogManager.getLogger(EqualsOperator)

new(Object leftOperand, List<?> rightOperands) {
super(leftOperand, rightOperands)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import edu.kit.ipd.sdq.metamodels.persons.PersonsFactory
import java.io.IOException
import java.nio.file.Path
import java.util.stream.Stream
import org.apache.log4j.Logger
import org.apache.logging.log4j.LogManager
import org.eclipse.xtend.lib.annotations.Delegate
import org.junit.jupiter.api.AfterEach
import org.junit.jupiter.api.BeforeEach
Expand Down Expand Up @@ -50,7 +50,7 @@ enum MemberRole {
*/
@ExtendWith(#[TestLogging, TestProjectManager])
class FamiliesToPersonsTest implements TestView {
static val logger = Logger.getLogger(FamiliesToPersonsTest)
static val logger = LogManager.getLogger(FamiliesToPersonsTest)
String nameOfTestMethod = null

@Delegate var TestView testView
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import edu.kit.ipd.sdq.metamodels.persons.PersonsFactory
import java.io.IOException
import java.nio.file.Path
import java.util.stream.Stream
import org.apache.log4j.Logger
import org.apache.logging.log4j.LogManager
import org.eclipse.xtend.lib.annotations.Delegate
import org.junit.jupiter.api.AfterEach
import org.junit.jupiter.api.BeforeEach
Expand Down Expand Up @@ -52,7 +52,7 @@ enum FamilyPreference {
*/
@ExtendWith(TestLogging, TestProjectManager)
class PersonsToFamiliesTest implements TestView {
static val logger = Logger.getLogger(PersonsToFamiliesTest)
static val logger = LogManager.getLogger(PersonsToFamiliesTest)
String nameOfTestMethod = null

@Delegate var TestView testView
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,16 @@ package tools.vitruv.dsls.reactions.generator

import com.google.inject.Inject
import com.google.inject.Provider
import org.apache.log4j.Logger
import org.apache.logging.log4j.Logger
import org.apache.logging.log4j.LogManager
import org.eclipse.emf.common.util.URI
import org.eclipse.xtend.lib.annotations.Delegate
import org.eclipse.xtext.resource.IGlobalServiceProvider
import tools.vitruv.dsls.reactions.api.generator.IReactionsGenerator

class ExternalReactionsGenerator implements IReactionsGenerator {

static Logger logger = Logger.getLogger(ExternalReactionsGenerator)
static Logger logger = LogManager.getLogger(ExternalReactionsGenerator)

// Injected during the setup of the runtime module (see ReactionsLanguageRuntimeModule).
@Inject
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ import org.eclipse.xtext.linking.impl.DefaultLinkingService
import org.eclipse.xtext.linking.impl.IllegalNodeException
import org.eclipse.xtext.nodemodel.ILeafNode
import org.eclipse.xtext.nodemodel.INode
import org.apache.log4j.Logger
import org.apache.logging.log4j.Logger
import org.apache.logging.log4j.LogManager
import org.eclipse.emf.ecore.EPackage
import org.eclipse.emf.ecore.EcorePackage

Expand All @@ -21,7 +22,7 @@ import org.eclipse.emf.ecore.EcorePackage
* Uses <code>EPackage.Registry</code> to deresolve URIs.
*/
class ReactionsLinkingService extends DefaultLinkingService {
static final Logger log = Logger.getLogger(typeof(ReactionsLinkingService));
static final Logger log = LogManager.getLogger(typeof(ReactionsLinkingService));

@Inject
IValueConverterService valueConverterService;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package tools.vitruv.dsls.reactions.runtime.reactions

import java.util.List
import org.apache.log4j.Logger
import org.apache.logging.log4j.LogManager
import org.eclipse.emf.ecore.EObject
import tools.vitruv.change.atomic.EChange
import tools.vitruv.change.composite.MetamodelDescriptor
Expand All @@ -19,7 +19,7 @@ import tools.vitruv.dsls.reactions.runtime.state.ReactionExecutionState
* A {@link ChangePropagationSpecification} that executes {@link Reaction}s.
*/
abstract class AbstractReactionsChangePropagationSpecification extends AbstractChangePropagationSpecification {
static val LOGGER = Logger.getLogger(AbstractReactionsChangePropagationSpecification)
static val LOGGER = LogManager.getLogger(AbstractReactionsChangePropagationSpecification)

val List<Reaction> reactions

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
package tools.vitruv.dsls.reactions.runtime.structure

import org.apache.log4j.Logger
import org.apache.logging.log4j.Logger
import org.apache.logging.log4j.LogManager

class Loggable {
val Logger LOGGER;

new() {
LOGGER = Logger.getLogger(this.class);
LOGGER = LogManager.getLogger(this.class);
}

protected def Logger getLogger() {
Expand Down

0 comments on commit 6e5e076

Please sign in to comment.