DuneBug
DuneBug

Reputation: 1613

NSLog Timestamps in Xcode Organizer's Console Don't Show Milliseconds

I am using NSLog to record logs in an iPhone application.

In Xcode when I execute my iPhone application with "Run -> Console," I get timestamps in the following format: "2011-06-06 18:34:58.189". When I view the console through the Xcode Organizer, the timestamps are in the following format: "Jun 6 18:42:51". Is there any way to ensure that the timestamps displayed in the Xcode Organizer display milliseconds?

Or would I need to write my own logging function instead of using NSLog?

Upvotes: 3

Views: 2084

Answers (2)

fpillet
fpillet

Reputation: 281

You could try using a utility I developed called NSLogger. It is much more flexible than plain NSLog, and should be able to be configured to display millisecond-precision timestamps.

Upvotes: 1

DuneBug
DuneBug

Reputation: 1613

I ended up using the method described here (http://blog.coriolis.ch/2009/01/09/redirect-nslog-to-a-file-on-the-iphone/) to redirect stderr to a file.

Upvotes: 1

Related Questions