Forum Discussion

opaciga's avatar
opaciga
New Contributor
2 years ago
Solved

Setting log level in ReadyAPI and TestRunner

Is there an official way to change the log level when running tests with ReadyAPI and TestRunner?

 

The ReadyAPI docs on groovy scripts only mention using `log.info` to write output from scripts. I would love to be able to use `log.debug`, so that when running locally people can set their ReadyAPI instance to log debug logs but when running with TestRunner in CI we would limit logs to info only.

 

  • RUDOLF_BOTHMA's avatar
    RUDOLF_BOTHMA
    7 years ago

    VERY old post, but the principals are still the same

     

    Multiple Recordset Stored Procedure

     

    Specifically:

    In ADO however when return multiple recordsets you loop through the
    recordet something like this

    SET Rst = Connection.Execute(procMultipleRst)

    doWhatever1 Rst

    SET Rst = Rst.NextRecordset
    doWhatever2 Rst

    SET Rst = Rst.NextRecordset
    doWhatever3 Rst

1 Reply

  • TNeuschwanger's avatar
    TNeuschwanger
    Community Leader

    Hello opaciga 

     

    Is this what you are attempting?

     

    import org.apache.log4j.Level;
    import org.apache.log4j.Logger;
    
    lvl = log.getLevel();
    log.info "lvl=$lvl";
    
    log.setLevel(org.apache.logging.log4j.Level.DEBUG);
    lvl = log.getLevel();
    log.debug "lvl=$lvl";

     

     

    Regards,

    Todd