XPLM_API void XPLMDebugString( const char * inString);
This routine outputs a C-style string to the Log.txt file. The file is immediately flushed so you will not lose data. (This does cause a performance penalty.)
Please do not leave routine diagnostic logging enabled in your shipping plugin. The X-Plane Log file is shared by X-Plane and every plugin in the system, and plugins that (when functioning normally) print verbose log output make it difficult for developers to find error conditions from other parts of the system.