LoggingResearch created ZOOKEEPER-4855:
------------------------------------------
Summary: Enhance Logging in AdminServerFactory to Reflect
Configuration Changes
Key: ZOOKEEPER-4855
URL: https://issues.apache.org/jira/browse/ZOOKEEPER-4855
Project: ZooKeeper
Issue Type: Improvement
Components: server
Affects Versions: 3.9.2
Environment: Zookeeper Version: 3.9.2
Location:
{{{}`zookeeper/zookeeper-server/src/main/java/org/apache/zookeeper/server/admin/AdminServerFactory.java`{}}},
in {{{}`{}}}{*}{{createAdminServer}}{*}{{{}`{}}} method. Lines 41-61.
Reporter: LoggingResearch
Attachments: AdminServerFactoryTest.java, original-vs-log-enhanced.md
The {{AdminServerFactory}} class in ZooKeeper creates an admin server based on
a configuration parameter ({{{}zookeeper.admin.enableServer{}}}). Currently,
there is no logging to indicate whether the server was enabled or disabled
based on this parameter, which makes it difficult to troubleshoot or verify
behavior during testing or in production. The enhancement proposes adding
logging to capture this configuration decision, aiding in better diagnostics
and understanding of server behavior.
*Expected Behavior:*
When the {{zookeeper.admin.enableServer}} property is set to {{{}"false"{}}},
the {{AdminServerFactory}} should log an informational message indicating that
the JettyAdminServer is disabled. When the property is set to {{{}"true"{}}},
the server should start without additional logging related to this property,
unless an error occurs.
*How-to-Fix:*
It's important to introduce required logging.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)