JDBC Client Driver Logger not being configured correctly#967
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR fixes a logging configuration issue where the JDBC client driver was not properly configured due to being in a different namespace (com.databricks.client.jdbc) than the main codebase (com.databricks.jdbc).
- Added configuration for the driver logger in the
com.databricks.client.jdbcnamespace - Added environment variable support for customizing the driver package prefix
- Moved a log message to execute after logger initialization
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| JulLogger.java | Added driver-specific logger configuration with separate namespace handling and environment variable support |
| LoggingUtil.java | Moved log message after logger initialization to ensure proper logging setup |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| // Only configure JUL logger if it's not already configured via external properties file | ||
| LOGGER.info("Setting up JUL logger"); | ||
| JulLogger.initLogger(toJulLevel(level), logDir, logFileSizeMB * 1024 * 1024, logFileCount); | ||
| LOGGER.info("Setting up JUL logger"); |
There was a problem hiding this comment.
for reviewer: Moved this log below because we want to log it after the setup
|
I might need more context here : but how is this helping with |
|
@samikshya-db |
|
Got it - @jprakash-db , now that I recall Zach from benchmarking team also had the same issue where he was able to see logs despite having a |
|
Also, is the SLF4J setup ok and need no changes? |
|
@samikshya-db I have verified it for SLF4J using the log4J impl and it is working properly. |
Description
JDBC client driver is present in a different namespace than the general codebase and due to this when we configure loglevel we only configure the root logger in the
com.databricks.jdbcchain but the Driver falls in thecom.databricks.client.jdbcchain and hence was not configured properlyIssue
#965
Testing
Manual testing to view logs in file and console settings
NO_CHANGELOG=true