shardingsphere icon indicating copy to clipboard operation
shardingsphere copied to clipboard

Add logging module, deprecate sql-show

Open Pace2Car opened this issue 2 years ago • 3 comments

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

Pace2Car avatar Jan 31 '23 06:01 Pace2Car

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.

RaigorJiang avatar Jan 31 '23 06:01 RaigorJiang

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.

Pace2Car avatar Jan 31 '23 07:01 Pace2Car

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.

linghengqian avatar Aug 04 '24 15:08 linghengqian