-
Notifications
You must be signed in to change notification settings - Fork 4
Front end Logging
Sean Fisher edited this page Jan 14, 2021
·
2 revisions
Javascript logging can be enabled to allow logs to be collected from the front-end.
add_filter( 'ai_logger_enable_js_logging', '__return_true' );
window.aiLogger = window.aiLogger || [];
window.aiLogger.push(['log message', { argumentsToInclude: 'value' }]);
The system will include additional information about the current request (such as the URL, current user, etc.) by default. Pass the window.aiLogger
array on the page a log message and arguments to store.