Skip to content

Logging quietness level not working #4058

@gregdev00

Description

@gregdev00

Snakemake version
9.16.3 starting from 9.0.0 after pr #3107 was merged

Describe the bug
Snakemake does not respect Quietness.HOST (it gets printed regardless of the setting), because the quietness for it is not being checked anymore

Before the said pr, it was handled like this:

logger.host_info()

def host_info(self):
self.handler(dict(level="host"))

if level == "host" and not self.is_quiet_about("host"):
self.logger.info(f"host: {platform.node()}")

Now its handled like this:

def format_host(self, msg: dict[str, Any]):
"""Format for host log."""
return f"host: {platform.node()}"

logger.info(f"host: {platform.node()}")

Logs
Assuming unrestricted shared filesystem usage.
host: 30ce4498b4d8
Building DAG of jobs...
Using shell: /usr/bin/bash

Minimal example
Run snakemake with --quiet host

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions