Skip to content

[BUG]: Blueprint applications launched with --debug do not automatically have DEBUG logging enabled #228

@asnare

Description

@asnare

The CLI pattern enabled by App doesn't properly propagate the log-level from the command payload into the logging system. This means that the --debug flag doesn't enable DEBUG logging, which is its intent.

The current situation is that:

  • The App plumbing does extract the intended log-level, and set it on the databricks logger.

  • The App plumbing also installs the custom logging handler on the root logger.

  • The root log-level is left as-is. (It defaults to WARNING).

  • The attached handler is set to handle anything at DEBUG or higher.

  • The application logger (which is typically under databricks.labs.[…]) has its level set:

    • If the app seems to be running within an IDE-based launcher (is_in_debug()): DEBUG
    • Otherwise: INFO

Crucially, even though the databricks logger has been set to DEBUG, the application logger (a child) is set to INFO and DEBUG-level logs will be dropped there, never propagating up to the root or the attached custom handler.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions