summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorManuel Bentele2021-08-24 12:44:58 +0200
committerManuel Bentele2021-08-24 12:44:58 +0200
commit3491eaa9403a35562ba50e6057a8bdc7532eb122 (patch)
tree3ac6c1be397f53267f9d2f9c445bb3b76b435666
parentFix invalid XML paths and types in Libvirt's mediated devices (diff)
downloadmaster-sync-shared-3491eaa9403a35562ba50e6057a8bdc7532eb122.tar.gz
master-sync-shared-3491eaa9403a35562ba50e6057a8bdc7532eb122.tar.xz
master-sync-shared-3491eaa9403a35562ba50e6057a8bdc7532eb122.zip
Print debug output in transformation manager
-rw-r--r--src/main/java/org/openslx/virtualization/configuration/transformation/TransformationManager.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/main/java/org/openslx/virtualization/configuration/transformation/TransformationManager.java b/src/main/java/org/openslx/virtualization/configuration/transformation/TransformationManager.java
index 197796d..b28fb32 100644
--- a/src/main/java/org/openslx/virtualization/configuration/transformation/TransformationManager.java
+++ b/src/main/java/org/openslx/virtualization/configuration/transformation/TransformationManager.java
@@ -2,6 +2,8 @@ package org.openslx.virtualization.configuration.transformation;
import java.util.ArrayList;
+import org.apache.log4j.Logger;
+
/**
* A transformation manager is a class to manage several transformations and their application.
*
@@ -33,6 +35,11 @@ public class TransformationManager<T, R>
private R args;
/**
+ * Logger instance to log messages.
+ */
+ private static final Logger LOGGER = Logger.getLogger( TransformationManager.class );
+
+ /**
* Create a transformation manager.
*
* @param config configuration which will be transformed.
@@ -63,6 +70,9 @@ public class TransformationManager<T, R>
*/
public void register( Transformation<T, R> transformation, boolean enabled )
{
+ LOGGER.debug( "Register transformation '" + transformation.getName() + "' and "
+ + ( enabled ? "enable" : "do not enable" ) + " it" );
+
transformation.setEnabled( enabled );
this.transformations.add( transformation );
}
@@ -107,6 +117,7 @@ public class TransformationManager<T, R>
public void transform() throws TransformationException
{
for ( Transformation<T, R> transformation : this.transformations ) {
+ LOGGER.debug( "Apply transformation '" + transformation.getName() + "'" );
try {
transformation.apply( this.config, this.args );
} catch ( TransformationException e ) {