0

I want to modify NSLog() so it only shows the current human readable timestamp, but no the app name.

This question shows how to remove both the app name and the timestamp in a very simple and elegant way.

Any easy and clean way of suppressing only the app name with macros? I wanted to avoid using an intermediate function with a NSDateFormatter object, etc.

Community
  • 1
  • 1
Ricardo Sanchez-Saez
  • 9,466
  • 8
  • 53
  • 92
  • You could just add the timestamp to those macros that you reference in that other question. – Rob Nov 20 '14 at 13:28
  • Do you mean by using a NSDateFormatter object within the macros? Or do you mean something else? Note that I want a human-readable timestamp (similar to the one NSLog() shows) not a "raw" one. – Ricardo Sanchez-Saez Nov 20 '14 at 13:31
  • Sure, if the `description` of the `NSDate` isn't to your liking (i.e. that's what it uses if you use `%@` and pass it a `NSDate` object), use date formatter. Use whatever you want. – Rob Nov 20 '14 at 13:36

0 Answers0