package groovy.util;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

import org.codehaus.groovy.transform.GroovyASTTransformationClass;

/**
 * This local transform adds a logging ability to your program using
 * java.util.logging. Every method call on a unbound variable named <i>log</i> 
 * will be mapped to a call to the logger. For this a <i>log</i> field will be 
 * inserted in the class. If the field already exists the usage of this transform
 * will cause a compilation error. The method name will be used to determine
 * what to call on the logger.
 * <pre>
 * log.name(exp)
 * </pre>is mapped to
 * <pre>
 * if (log.isLoggable(Level.NAME) {
 *    log.name(exp)
 * }</pre>
 * Here name is a place holder for info, fine, finer, finest, config, warning, severe.
 * NAME is name tranformed to upper case. if anything else is used it will result in 
 * an exception at runtime. If the expression exp is a constant or only a variable access
 * the method call will not be transformed. But this will still cause a call on the injected 
 * logger.
 * 
 * @author Guillaume Laforge
 * @author Jochen Theodorou
 * @author Dinko Srkoc
 * @author Hamlet D'Arcy
 * @author Raffaele Cigni
 * @author Alberto Vilches Raton
 */
@Retention(RetentionPolicy.SOURCE)
@Target({ElementType.TYPE})
@GroovyASTTransformationClass("org.codehaus.groovy.transform.LogASTTransformation")
public @interface Log {
	
}

@@ -407,17 +407,16 @@
 %3Elog%3C/i%3E
- 
 %0D%0A * wil
@@ -487,17 +487,16 @@
  will be
- 
 %0D%0A * ins
@@ -985,17 +985,16 @@
 esult in
- 
 %0D%0A * an 
@@ -1170,17 +1170,16 @@
 injected
- 
 %0D%0A * log
@@ -1186,17 +1186,16 @@
 ger.%0D%0A *
- 
 %0D%0A * @au
@@ -1542,9 +1542,8 @@
  %7B%0D%0A
-%09
 %0D%0A%7D%0D

remove tab