# How to handle logging for a repeatedly-run subtask?

XMLWordPrintable

## Details

• Type: Story
• Status: To Do
• Resolution: Unresolved
• Fix Version/s: None
• Component/s:
• Labels:
None
• Templates:
• Team:
Data Access and Database

## Description

How should one handle limiting the logging of a subtask when it is run many times?

This arose in DM-7611: a task can be run either once (in which case it generates a limited amount of useful INFO logging), or be run as a subtask, in which case it is run many (>100) times. In the latter case, the INFO logging is not as useful, and the calling task squashes the INFO logging of the subtask before calling its run method, but that could be dangerous if the user actually wants to get all of the INFO messages.

Here is the discussion in the PR:
https://github.com/lsst/ip_diffim/pull/53#discussion_r108770375

What is the correct way to handle this?

## People

• Assignee:
Unassigned
Reporter:
David Reiss
Watchers:
David Reiss, Fritz Mueller, Hsin-Fang Chiang, John Parejko, Kian-Tat Lim, Simon Krughoff