Logging for C-Core SDK
This page explains how to configure logging in the PubNub C-Core Software Development Kit (SDK). Logging helps you monitor SDK activity, troubleshoot issues, and maintain audit trails during development and production.
For general logging concepts and best practices applicable to all PubNub SDKs, see Logging.
Logging in pre-7.0.0 versions
This logging documentation applies to C-Core SDK version 7.0.0 and later. Older versions used a simpler preprocessor-based system with PUBNUB_LOG_PRINTF and PUBNUB_LOG_LEVEL macros. Those macros are no longer supported.
If your application used pubnub_set_log_callback(), migrate to the logger API by creating a logger with pubnub_logger_alloc() and registering it with pubnub_logger_add().