Forum Discussion

vivekagrawal's avatar
vivekagrawal
New Contributor
14 years ago

'\n' in log.info not printing in new line in script log

Hi,

If I give log.info("FirstLine\nSecondLine") in a groovy script. The output in script log area is:

FirstLineSecondLine

What I want from a single log.info() method call is below:

FirstLine
SecondLine

How can we achieve this?

Regards
Vivek

6 Replies

  • swalkersbw's avatar
    swalkersbw
    New Contributor

    I am having the same problem, what is the answer to this question?

    • nmrao's avatar
      nmrao
      Community Hero

      The answer is to use multiple statements to log the details in separate lines, IMO.

       

      However, '\n' should work if you use println which will be logged into soapui.log file.

       

       

      • swalkersbw's avatar
        swalkersbw
        New Contributor

        Thanks nmrao, I'll go with using log.info for each line as it's the simplest alternative,  cheers.