Forum Discussion

RJanecek's avatar
RJanecek
Regular Contributor
14 years ago

working with log

hi I just start working work with log.info log.debug log.error.
Where I can set what I wanna log ? for example just log.info
thx
  • Hello,

    The log variable references a Logger object, which has debug(), info(), error() methods etc. The usage of these is generally that you call them with whatever you wish to log, for example:


    log.info( "Doing some stuff, and logging about it!" )


    Since this is Groovy, the parentheses are optional. The above is equivalent to this:


    log.info "Doing some stuff, and logging about it!"


    If the argument passed to log.info() isn't a String, it will be converted using the objects toString() method.

    Regards,
    Dain
    SmartBear Software