-
Notifications
You must be signed in to change notification settings - Fork 38
Logging To The Debug Log
Frank Corso edited this page Aug 6, 2020
·
1 revision
Using Popup Maker's logging system, you can quickly add log new messages to the debug log to be viewed within the plugin or by reviewing the log file.
To log any message, use the log
method of the logging system:
PUM_Utils_Logging::instance()->log( 'Some random error message.' );
To log any message only one time, use the log_unique
method:
PUM_Utils_Logging::instance()->log_unique( 'This error will only appear once in the logs.' );
To log a deprecation notice, use the log_deprecated_notice
method. This method takes the name of the function, the version it was deprecated, and an optional replacement.
PUM_Utils_Logging::instance()->log_deprecated_notice( 'old_function', 1.5, 'recommended_replacement_function' );