3

I want to clear logs from consol by coding like we are using clrscr() in c language I am working on a navigation based application this application has too much logs generated by NSLog. When i feel that the code is working fine till now, i want to clear logs.

I got a solution from this question but this solution adds \n in the logs and i want to clear it completely so if you have any other solution please share with me.

thanks in advance i am waiting for your help.

Community
  • 1
  • 1
Nirav Gadhiya
  • 6,342
  • 2
  • 37
  • 76

1 Answers1

4

I don't believe its possible to clear the console from inside your application.. However if you are developing in XCode, just click in the console output window and press cmd k - this will clear all of the scrollback...

Alternatively - just disable the logging / wrap the nslog calls in another method that limits how much is displayed

dotbill
  • 1,001
  • 7
  • 13