Dynamic Log Level Control for Production Debugging
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Current methods for logging in production systems are inadequate for debugging issues without significantly impacting system performance, as they typically do not enable DEBUG mode due to resource constraints.
Innovation Solution
A dynamic logging system that adjusts log levels based on the health of data traffic, allowing for precise and efficient debugging by marking and logging data traffic at varying levels, including DEBUG, without continuous performance degradation.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Measurement precision
If DEBUG mode is enabled continuously to capture detailed debugging information, then measurement precision is improved, but use of energy and system performance deteriorate
Solution Approach 1:
The patent implements dynamic log level adjustment based on data traffic health indicators. The system transitions from static logging configurations to dynamic ones, automatically raising log levels to DEBUG when anomalies are detected and lowering them when system health is normal, thereby capturing necessary debugging information only when needed.
Solution Approach 2:
The system changes the logging parameter (log level) dynamically based on health indicators. When health metrics indicate a problem, the log level parameter is adjusted from production level (ERROR/WARNING) to DEBUG level, enabling detailed information capture only during problematic periods rather than continuously.
2Measurement precision
If DEBUG mode is enabled continuously to capture detailed debugging information, then measurement precision is improved, but productivity deteriorates
Solution Approach 1:
The system dynamically adjusts logging behavior based on real-time health monitoring. When health indicators are normal, the system operates at production log levels with minimal performance impact. When anomalies are detected, it transitions to DEBUG mode temporarily, capturing detailed information only during problematic periods.
Solution Approach 2:
Instead of continuous DEBUG logging, the system implements periodic health monitoring and adjusts log levels accordingly. DEBUG mode is activated periodically only when health indicators suggest a problem, rather than running continuously, thus maintaining productivity while enabling debugging when needed.
3Measurement precision
If log level is raised to DEBUG temporarily when problems occur, then measurement precision is improved, but ease of operation deteriorates
Solution Approach 1:
The system performs self-service by automatically monitoring its own health indicators and adjusting log levels without manual intervention. When health metrics indicate a problem, the system autonomously raises log levels to DEBUG, captures relevant information, and then lowers them when the issue is resolved, eliminating the need for operators to manually enable DEBUG mode.
Solution Approach 2:
The system implements a feedback loop where health indicators continuously monitor system state and automatically trigger log level adjustments. When health metrics cross certain thresholds, the system responds by adjusting logging behavior, creating a closed-loop control system that eliminates manual operation while maintaining measurement precision.
Data Source
AI summary
Embodiments of the present teachings disclose method, system, and programs for data driven dynamic logging. Data is received by a logging system where the data is flagged for dynamic logging when one or more dynamic flagging level criteria are satisfied. Data is evaluated by a logging module wrapper, which determines whether to log the data using the default logging level or dynamic logging level, according to whether the data is flagged. A logging module logs information in a logging database according to the default logging level or dynamic logging level. Based on the logged information and detected abnormalities the dynamic flagging level and dynamic logging level are automatically or manually adjusted.


