user1046037
user1046037

Reputation: 17685

ios - c file log message

I have a ios application which has some C files. I would like it to printed in the console.

I would like to log messages and print the value of an unsigned int inside the C file in the console.

NSLog and printf doesn't work, is there a way to do this ?

Or is there any work around ?

Upvotes: 1

Views: 1463

Answers (2)

Seema Kadavan
Seema Kadavan

Reputation: 2638

This works for OS X apps. It might work for iOS also.

#include <syslog.h>

syslog(LOG_WARNING, "Log me to console");

Upvotes: 3

nchen24
nchen24

Reputation: 502

Have you tried fprintf instead of printf?

unsigned int err;
fprintf(stderr, "Error: %u", err);

Upvotes: 0

Related Questions