@Log annotation
@Log : This annotation provides the log object in groovy class. By using it you don’t need to create the Logger object, it automatically provides log object.
Example:
[groovy]
import groovy.util.logging.Log
@Log
class Person {
String name
String address
String city
public void logDetails(){
log.info("Name:::${name}—>Address ::: ${address}—> city :::${city}")
}
}
new Person(name:"Mohit Garg",address:"Address",city: "city").logDetails()
[/groovy]
It logs the details of the person object.
Hope this will help you 🙂
Hi Pavel,
It is using the logger of java.util.logging package.
Which logger it uses?
util.logging? log4j, slf4j?