Description
The original intention of shardingsphere-logging
is to allow users to dynamically modify the cluster's log configuration, such as change the log level or add new logger, through DistSQL, to avoid modifying log files, such as logback.xml, on each computing node.
Currently, it is indeed possible to dynamically set the log level through DistSQL, for example.
set dist variable system_log_level = 'DEBUG';
However, if you want to use DistSQL to implement the full functionality of the log configuration file, its syntax is too complex and difficult to use.
In addition, the most important thing is two limitations:
-
The logging module needs to instantiate a specific log configuration object, which will bind it to the log implementation, resulting in a strong dependency;
-
Log components such as logback have their own configuration priority strategy. When logback.xml exists, the configuration in the code is actually invalid.
Therefore, the shardingsphere-logging
module cannot meet the functional requirements. It is recommended to remove it and restore to the xml configuration method.
If the user needs to dynamically update the configuration, use the method provided by the log component itself, such as file scan.
Tasks
- Remove module
shardingsphere-logging
- Remove SPI implement class
LogbackConfiguration
- Add logback.xml to proxy (Refer to https://shardingsphere.apache.org/document/current/en/user-manual/shardingsphere-proxy/logging/)