TopoStats icon indicating copy to clipboard operation
TopoStats copied to clipboard

Add the ability to disable logging

Open ns-rse opened this issue 1 year ago • 4 comments

@tdjames1 highlighted that all of the modules include logging such that when used in isolation they produce lots of .log files.

The entry-point has the ability to run --quiet which reduces output and #929 helped considerably.

It would however be useful to add a --silent argument to suppress all output and ensure that individual modules don't perform logging when used in isolation.

ns-rse avatar Feb 21 '25 14:02 ns-rse

In my use case there is logging output both to stdout and to a log file, with a mix of different styles of log messages.

tdjames1 avatar Feb 21 '25 14:02 tdjames1

Hi @tdjames1 ,

I want to test that what I think is a solution works for your use case. Do you have a code snippet you could share to show how you are using TopoStats please?

ns-rse avatar Feb 24 '25 16:02 ns-rse

Here's a snippet showing the noisy section:

from topostats.io import LoadScans

img_files = [  ... list of paths to .spm files ... ]
load_config = {'channel': 'Height'}

# Load scans
loadscans = LoadScans(img_files, **load_config)
loadscans.get_data()

tdjames1 avatar Feb 25 '25 10:02 tdjames1

I've also got calls which use Filters.filter_image() which I think also created a lot of output, but I'm not triggering those atm.

tdjames1 avatar Feb 25 '25 11:02 tdjames1