apache / shardingsphere

Distributed SQL transaction & query engine for data sharding, scaling, encryption, and more - on any database.
Apache License 2.0
19.79k stars 6.7k forks source link

Add logging module, deprecate sql-show #23856

Open Pace2Car opened 1 year ago

Pace2Car commented 1 year ago

Feature Request

For English only, other languages will not accept.

Please pay attention on issues you submitted, because we maybe need more details. If no response anymore and we cannot make decision by current information, we will close it.

Please answer these questions before submitting your issue. Thanks!

Describe the feature you would like.

In order to unify log configuration management and provide more log configurations in the future.

Add logging module under the kernel, add logging global rule, persist the log configuration to the governance center, move the porps sql-show to logger ShardingSphere-SQL's props enable

Keep using props sql-show, and mark it as deprecated

RaigorJiang commented 1 year ago

Hi @Pace2Car I can guess what you are going to do from the description, but it doesn't feel detailed enough. Hope you can provide more information.

Pace2Car commented 1 year ago

Hi @Pace2Car I can guess what you are going to do from the description, but it doesn't feel detailed enough. Hope you can provide more information.

The current ShardingSphere log implementation uses logback, and the log configuration only provides a few parameters to configure.In cluster mode, Proxy uses logback.xml for custom log configuration, which only takes effect on the current node and cannot be modified globally.

In this feature, I want to add the log configuration to the global rule so that the log configuration can be unified in cluster mode. Then, the log configuration can be managed by DistSQL.

In this case, the configuration of topic ShardingSphere-SQLcorresponding to sql-show will also be persisted to the governance center, so sql-show should be moved to this logger configuration.

linghengqian commented 1 month ago

I only noticed this issue after I opened #32389. In fact, there are too many adapters for Slf4j API, at least there are third-party adapters for Log4j1, Log4j2, Logback, Reload4j, Jakarta Commons Logging and Apache Commons Logging.