Skip to content

Java driver emits "Failed to initialize logging" warning from Rust native layer #835

@faseidl

Description

@faseidl

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

  1. TypeDB distribution: Core
  2. TypeDB version: 3.7.0 (both server and Java driver)
  3. Environment: macOS (Darwin 25.2.0)
  4. Studio version: N/A
  5. Other details: Kotlin/JVM application using SLF4J + Logback for logging

Reproducible Steps

  1. Set up

    Create a Java/Kotlin application with SLF4J + Logback logging framework configured.

  2. Execute

    val driver = TypeDB.coreDriver(
        TypeDB.address("localhost", 1729),
        Credentials("admin", "password", tlsEnabled = false)
    )
    
  3. 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:

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions