Custom console log
This guide explains how to customize and control the developer console logging in BacktestX Chart. Using the custom-console-log.js configuration script, you can toggle all chart-related logging or redirect it cleanly.
Introduction
During development, the charting library outputs detailed diagnostic information. However, in production environments, you typically want to suppress these logs. The logging controller provides an easy way to manage this.
How to Use
To customize the logging behavior, edit the custom-console-log.js file. Simply set the CONSOLE_LOG constant to true to enable logs, or false to disable them:
const CONSOLE_LOG = false; // Set to false to disable all console logs in production
Production Logging
When CONSOLE_LOG is set to false, all standard browser console methods (log, error, warn, info) are intercepted and disabled for the chart modules.
If you need to log a message that bypasses this filter, you can call the original browser methods directly or customize the interception logic within custom-console-log.js.