3

I've written a very simple groovy script that just connects to a database and then prints out how long it takes to run a particular query.

I'm using this output as input to another process that will track the execution duration over time.

The problem is that my script spits out a bunch of logging messages other than my program's actual output and I want to disable it in the simplest way possible. Either by passing in an argument to the program from the command line, or with code in my script.

Here's a sample of the output from my program. All I want to see is the last line which shows a number (45 in this example)

Jun 5, 2014 5:05:23 PM org.codehaus.groovy.runtime.m12n.MetaInfExtensionModule newModule
WARNING: Module [groovy-nio] - Unable to load extension class    [org.codehaus.groovy.runtime.NioGroovyMethods]
Jun 5, 2014 5:05:23 PM org.codehaus.groovy.runtime.m12n.MetaInfExtensionModule newModule
WARNING: Module [groovy-nio] - Unable to load extension class [org.codehaus.groovy.runtime.NioGroovyMethods]
45
codemonkey
  • 1,213
  • 2
  • 14
  • 31

0 Answers0