ashniku opened a new pull request, #6732: URL: https://github.com/apache/hive/pull/6732
--> ### What changes were proposed in this pull request? 1. logconf.jsp — always renders the "Set new logging rules" form (previously it was hidden unless a JDBC session existed and was rendered once per session). Replaces the free-text logger field with a dropdown and aligns the form controls. 2. logconf.js — populates the logger dropdown from /conflog, auto-selects the selected logger's current level, shows the root logger as (root), POSTs updates as application/json, treats the empty 200 response as success (fixing a false "failed" error), and builds the table with text() to prevent HTML injection. 3. Log4j2ConfiguratorServlet — fixes level updates so configuring a not-yet-defined child logger adds a new logger instead of silently changing one of its ancestors (getLoggerConfig returns the nearest ancestor for an unconfigured name). 4. Tests — adds TestLog4j2ConfiguratorServlet covering new-logger creation, in-place updates, the root logger, and every level offered by the UI. --> ### Why are the changes needed? <!-- The page could not configure logging when there were no active sessions, could accidentally change a parent logger's level, displayed the root logger as a blank row, and showed a spurious error on every successful update. Together these made the feature effectively unusable. --> ### Does this PR introduce _any_ user-facing change? <!-- Yes — WebUI only. The "Configure logging" page now shows a populated logger dropdown, correctly applies levels, labels the root logger (root), and no longer shows a false error on success. No API/CLI/config changes. --> ### How was this patch tested? <!-- 1. New unit test TestLog4j2ConfiguratorServlet (5 tests) — passing. 2. Manual end-to-end on a MiniHS2 LLAP cluster: verified all 32 runtime loggers × all 6 levels (TRACE→FATAL) applied and reflected back via /conflog, and that a new child logger did not alter its parent. --> -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
