4

My Swift print statements don't seem to go to the system out log on Bluemix; I see print lines from STG, DEA, RTR; but nothing from my APP. Does it require some configuration in Swift?

JWPerry
  • 95
  • 6

1 Answers1

1

we also experienced the same issue. The reason is that the output is getting buffered. To address this, you could flush the stdout in Swift after each print command, or you could disable buffering on stdout at the very beginning of your app using:

setbuf(stdout, nil)

We have successfully tested the above in several of our swift apps. After disabling buffering, you should start seeing your app's logging statements right away.

rolivieri
  • 100
  • 1
  • 7