1

I'm currently trying to set up a simple logger for my application, and figured that i'd be much more convenient if I can just NSLog() onto a text file. Is there a simple method to do this?

nhgrif
  • 61,578
  • 25
  • 134
  • 173
Min Tseng
  • 181
  • 1
  • 2
  • 5
  • for NSLog use this link: http://stackoverflow.com/questions/9097424/logging-data-on-device-and-retrieving-the-log/41741076#41741076 – Kiran P Nair Jan 19 '17 at 11:49
  • For just save the outputs as File use this: http://stackoverflow.com/questions/28114110/possible-to-write-swift-println-logs-into-file-too/41740777#41740777 – Kiran P Nair Jan 19 '17 at 11:52

1 Answers1

1

You could use ASL, the direct counterpart of syslog that write directly to text file.

Some example code

Useful link

Documentation

bauerMusic
  • 5,470
  • 5
  • 38
  • 53
John Difool
  • 5,572
  • 5
  • 45
  • 80