You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The log_handler function of the log-handler-script parameter is repeatedly added to snakemake.logging.Logger.log_handler, causing the log_handler function to be called twice for every logging message.
Possible Reason
The log_handler function seems to be added to snakemake.logging.Logger.log_handler twice; once here:
The problem presents itself when I run the following command with the Snakefile and log_job.py files given below. Note that every message, except the first one, is printed twice.
I see this too when testing the wms logger. Printing logger.log_handler shows the wmslogger doubled up:
[<bound method Logger.text_handler of <snakemake.logging.Logger object at 0x10ce3bb30>>,
<bound method WMSLogger.log_handler of <snakemake.logging.WMSLogger object at 0x10e603470>>,
<bound method WMSLogger.log_handler of <snakemake.logging.WMSLogger object at 0x10e603470>>]
I guess this might be something that didn't get caught in the transition to the api?
Snakemake version
v8.10.6
Describe the bug
The
log_handler
function of thelog-handler-script
parameter is repeatedly added tosnakemake.logging.Logger.log_handler
, causing thelog_handler
function to be called twice for every logging message.Possible Reason
The
log_handler
function seems to be added tosnakemake.logging.Logger.log_handler
twice; once here:snakemake/snakemake/api.py
Line 141 in b3c1dd4
and once here:
snakemake/snakemake/api.py
Lines 526 to 530 in b3c1dd4
Minimal example
The problem presents itself when I run the following command with the Snakefile and log_job.py files given below. Note that every message, except the first one, is printed twice.
Snakefile:
log_job.py:
command:
snakemake --snakefile Snakefile -c 1 --log-handler-script log_job.py
Output:
The text was updated successfully, but these errors were encountered: