Forum Discussion

bughunter's avatar
bughunter
Occasional Contributor
8 years ago

Logging to Script Log from two different log files using Groovy

Log files return correct results to the Script Log when called separately, but when called at the same time only the second log is recorded in the Script Log. These scripts are at the Test Case level. I would like to record the results from both logs with a single test execution instead of two runs one for each log. "LogLookup" is a groovy lib that does the paring and printing to the Script Log. Any suggestions to make this happen are appreciated.

 

Setup script

def cLog = new LogLookup()

context.setProperty("LogLookup",cLog)

context.LogLookup.prepare(context, log, "host", "username", "pw", "1st log", ‘what to look for’)

context.LogLookup.prepare(context, log," host " ,"username", "pw", "2nd log", ‘what to look for’)

 

 

Teardown Script

context.LogLookup.process(context, log, "host", "username", "pw", "1st  log ", ' what to look for ')

context.LogLookup.process(context, log, "host", "username", "pw", "2nd log", ' what to look for ')

 

Thanks for your help.

Dan

No RepliesBe the first to reply