Forum Discussion

krogold's avatar
krogold
Regular Contributor
6 years ago
Solved

how to store log.info into external file

 

 Hello,
 
I'm currently trying to output (in a simple way) the logger info into an external file, ie. output the content of the Script Log tab in a file.
I had a look to the existing log files from readyAPI but none of them provides me with the relevant information only
 
can anyone help, please ?
 
Thanks
 
Alex
  • When I use log.info, I see all of my messages in the groovy.log file. Ensure you have logging enabled? I think there's a setting for that somewhere.

5 Replies

  • groovyguy's avatar
    groovyguy
    Champion Level 1

    The log.info call already gets stored in an external log file stored in (example is windows)

    c:\users\USERNAME\.readyapi\logs

     

    Do you need more than that? If so, you may want to consider writing to a file yourself, because there will be a lot more written to logs than you may want to consume. 

    • krogold's avatar
      krogold
      Regular Contributor

      Well, I knew that, but in fact I can't find my logs in those files, I don't know why.

      I want to trace events during execution of a test case, which shows in the 'Script Log' tab of ready API, and I thought this would be also available in the logs of readyAPI.

      But I'm afraid I'll have to do this programmatically.

      Unless there is some extra log generation if I use testRunner instead of launching my test directly from readyAPI ?

       

      anyway, thanks for answering

       

      Alex

       
       
       
       
      • groovyguy's avatar
        groovyguy
        Champion Level 1

        When I use log.info, I see all of my messages in the groovy.log file. Ensure you have logging enabled? I think there's a setting for that somewhere.