1

What are differences between DDLog(Error|Warn|Info|Verbose) and DDLogC(Error|Warn|Info|Verbose) in Cocoa Lumberjack?

The first calls LOG_OBJC_MAYBE, second LOG_C_MAYBE, but what is the exact difference?

oguz ismail
  • 1
  • 16
  • 47
  • 69
Fishman
  • 1,737
  • 1
  • 25
  • 42

2 Answers2

1

I was wondering the same thing until I tried to use DDLog in one of my "C" function. The DDLog macro retrieves the name of the Objective C method with _cmd which is not available for C functions. For C functions DDLogC uses __FUNCTION__ to retrieve the name. Conclusion DDLog is to be used in Objective C methods and DDLogC in C functions.

Knshiro
  • 231
  • 2
  • 11
0

As the documentation states, DDLog(Error|Warn|Info|Verbose) is used for objective C code and DDLogC(Error|Warn|Info|Verbose) is used for C code. Please stick to th

Bogdan
  • 101
  • 2