/*
 * Copyright 2015 Michael Rozumyanskiy
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package io.michaelrocks.lightsaber.processor.generation;

import io.michaelrocks.lightsaber.processor.ProcessingException;
import io.michaelrocks.lightsaber.processor.ProcessorContext;
import io.michaelrocks.lightsaber.processor.io.ClassFileVisitor;

import java.io.IOException;

public class ProcessorClassProducer implements ClassProducer {
    private final ClassFileVisitor classFileVisitor;
    private final ProcessorContext processorContext;

    public ProcessorClassProducer(final ClassFileVisitor classFileVisitor, final ProcessorContext processorContext) {
        this.classFileVisitor = classFileVisitor;
        this.processorContext = processorContext;
    }

    @Override
    public void produceClass(final String internalName, final byte[] classData) {
        final String classFileName = internalName + ".class";
        try {
            classFileVisitor.visitClassFile(classFileName, classData);
        } catch (final IOException exception) {
            final String message = String.format("Failed to produce class with %d bytes", classData.length);
            processorContext.reportError(new ProcessingException(message, exception, classFileName));
        }
    }
}

@@ -847,16 +847,73 @@
 Visitor;
+%0Aimport org.slf4j.Logger;%0Aimport org.slf4j.LoggerFactory;
 %0A%0Aimport
@@ -998,16 +998,113 @@
 ducer %7B%0A
+    private static final Logger logger = LoggerFactory.getLogger(ProcessorClassProducer.class);%0A%0A
     priv
@@ -1519,24 +1519,82 @@
 lassData) %7B%0A
+        logger.debug(%22Producing class %7B%7D%22, internalName);%0A
         fina

Add debug logging to ProcessorClassProducer