-
Notifications
You must be signed in to change notification settings - Fork 38
Description
Description
When creating a TypeDB driver instance in Java/Kotlin, the driver emits a warning message from its Rust native layer: "Failed to initialize logging: attempted to set a logger after the logging system was already initialized". This appears to be coming from the Rust driver's JNI bindings attempting to initialize logging when the Rust logging system has already been initialized by another component.
Environment
- TypeDB distribution: Core
- TypeDB version: 3.7.0 (both server and Java driver)
- Environment: macOS (Darwin 25.2.0)
- Studio version: N/A
- Other details: Kotlin/JVM application using SLF4J + Logback for logging
Reproducible Steps
-
Set up
Create a Java/Kotlin application with SLF4J + Logback logging framework configured.
-
Execute
val driver = TypeDB.coreDriver( TypeDB.address("localhost", 1729), Credentials("admin", "password", tlsEnabled = false) )
-
Warning appears on stderr:
Failed to initialize logging: attempted to set a logger after the logging system was already initialized
Expected result
The driver should initialize without emitting warnings or should gracefully detect that logging is already initialized and skip reinitialization. The driver should start cleanly without warnings to stderr.
Additional information
Impact:
- Low severity: Driver functions correctly despite the warning
- Warning appears in production logs and CI/CD output
- Cannot be suppressed with RUST_LOG or TYPEDB_DRIVER_LOG environment variables
Observations:
- This does not occur when the driver is not initialized (e.g., application runs in test mode without an actual database connection)
- Warning appears specifically when the driver's native (Rust) components are loaded via JNI
- Issue appears to be related to Rust logging initialization: attempted to set a logger after the logging system was already initialized Drakulix/simplelog.rs#122
Relevant logs from Driver:
Failed to initialize logging: attempted to set a logger after the logging system was already initialized
This is the only output - no stack trace or additional context is provided.