I am a bit at loss when a Cocoa plugin is not compiled as __OBJC__. On Sierra (10.12xx) you can use os_log to get messages out to the Console.app, while fprintf, using stderr sends messages to Terminal.app on windows and Mac (Linux too, but is not relevant in this context). On windows, sending messages to DebugView when using OutputDebugString. On older OS X versions we could use DebugStr, but does not seem to work on OS X 10.9, 10.10 and 10.11. The plugin cannot be compiled as Objective-C, so NSLog is out of the question.
If there is a solution for 10.9/10.10/10.11 I would appreciate to hear about it. In addition, how should one include <OS/log.h> at runtime, which depends on whether or not we are running 10.12?