Application Log Coding via Conversion Appenders for Secure Output
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing Java application logging frameworks require explicit preprocessing for sensitive information, leading to changes in programming habits and potential failures due to negligence, and cannot autonomously process logs within third-party class libraries.
Innovation Solution
Introduce a conversion appender between the native logger and native appender, utilizing log sub-converters like Regex, Json, and Base64 converters, which are configured via an extension mechanism, allowing secure log coding without application retrofitting.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If explicit preprocessing is performed before calling the logging framework to code sensitive information, then coding output of sensitive information is achieved, but the application's API changes requiring retrofitting and developers' programming habits are significantly changed
Solution Approach 1:
The patent introduces a conversion appender as an intermediary component between the native logger and the output destination. This conversion appender automatically performs the coding preprocessing of sensitive information without requiring changes to the application's logging API or developers' programming habits, thus resolving the contradiction between achieving reliable coding output and maintaining ease of operation
Solution Approach 2:
The conversion appender is configured in advance with coding rules and sensitivity level thresholds. When logs are generated, the preprocessing and coding of sensitive information is automatically performed based on these pre-configured rules, eliminating the need for explicit preprocessing by developers and maintaining their original programming habits
2Reliability
If explicit preprocessing is performed before calling the logging framework to code sensitive information, then coding output of sensitive information is achieved, but additional coding preprocessing steps are required each time before calling the logging framework
Solution Approach 1:
The conversion appender serves as an automatic intermediary that intercepts log messages between the native logger and the output destination. It automatically performs sensitivity detection and coding preprocessing without requiring additional explicit preprocessing steps in the application code, thus reducing system complexity while ensuring reliable coding output
Solution Approach 2:
The conversion appender autonomously performs the coding preprocessing task by detecting sensitive information in log messages and applying appropriate coding rules automatically. This self-service mechanism eliminates the need for developers to manually perform preprocessing steps, thereby reducing the complexity of the logging system
3Ease of operation
If preprocessing is omitted due to negligence before calling certain log printing, then the desired coding effects are not achieved, but the application code remains unchanged
Solution Approach 1:
The conversion appender acts as a safety intermediary that automatically performs coding preprocessing even when developers omit explicit preprocessing steps. By intercepting log messages and applying coding rules based on sensitivity levels, it ensures reliable coding effects are achieved regardless of whether developers follow the preprocessing requirement, thus maintaining both ease of operation and reliability
4Adaptability or versatility
If a conversion appender is introduced between the native logger and native appender to enable automatic log coding, then diversified log coding outputs are achieved without retrofitting application code, but the logging framework structure becomes more complex
Solution Approach 1:
The conversion appender is designed as a universal component that can handle multiple types of sensitive information (different sensitivity levels) and apply various coding rules. It provides diversified log coding outputs for different scenarios while maintaining a unified interface, thus achieving adaptability without proportionally increasing structural complexity
Solution Approach 2:
The conversion appender internally segments the logging process into distinct stages: sensitivity detection, sensitivity level judgment, and coding rule application. This segmentation allows the system to handle diverse coding requirements through a modular structure, achieving versatility while keeping the overall framework complexity manageable through organized functional divisions
Data Source
AI summary
The present disclosure provides an application log coding output method, a device, a system, and a computer readable storage medium. The method comprises: loading a conversion appender using an extension mechanism of a native logger, loading a log converter and a native appender for outputting a log message using the conversion appender, the log converter comprising one or more log sub-converters, and loading the log sub-converters specified by an initialization parameter using the log converter; receiving the log message sent by the native logger using the conversion appender, scheduling the log sub-converters specified by the initialization parameter to execute log coding, and sending the processed log to the native appender for secure output. By using the method, diversified log coding output can be achieved without retrofitting an application, and the method is more friendly to developers.

