Groovy @Log 的用法

清华大佬耗费三个月吐血整理的几百G的资源,免费分享!....>>>

import groovy.util.logging.*
import java.util.logging.Level

@Log("log2")
class Car {
    Car() {
        log2.setLevel(Level.FINE)
        log2.severe 'Car constructed'
        log2.warning 'Car constructed'
        log2.info 'Car constructed'
        log2.config 'Car constructed'
        log2.fine 'Car constructed'
        log2.finer 'Car constructed'
        log2.finest 'Car constructed'
    }   
}

def c = new Car()