groovy-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gerald Wiltse <jerrywil...@gmail.com>
Subject @Log annotation inside Groovy Script
Date Fri, 08 Jan 2016 19:00:30 GMT
I just got @Log to work in some test classes, then learned that  @Log
annotations do not work in scripts. Is this true? If so, is there some
workaround that exists?  I assume this is true for all @annotations and
scripts, so it seems pretty sad if there's no way to do it.

I'm basing that conclusion on this post, and my own error.
http://stackoverflow.com/questions/15981182/logging-in-groovy-script

If that is the case, maybe someone can help me with a solution :

Our use case is this:

Our scripts are launched on a scheduled basis by the JVM
Several class files are called throughout the execution of each script
For each execution, we want the script and any called classes to share one
log
This means all logging configuration would have to be programmatic / dynamic

The hope is that the script can define the log based on variables at
execution time, and then the classes will somehow "Inherit" the variable
from the script that called it.

Does this seem possible?

Regards,
Jerry

Mime
View raw message