Skip to content

Commit

Permalink
demos_refactor: Convert all CLI demos to use more concise logging lin…
Browse files Browse the repository at this point in the history
…es, loglevel to INFO
  • Loading branch information
pgunn committed Mar 14, 2024
1 parent 25e156e commit 141b2aa
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 28 deletions.
8 changes: 4 additions & 4 deletions demos/general/demo_OnACID.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@ def main():

if cfg.logfile:
logging.basicConfig(format=
"%(relativeCreated)12d [%(filename)s:%(funcName)20s():%(lineno)s][%(process)d] %(message)s",
level=logging.WARNING,
"[%(filename)s:%(funcName)20s():%(lineno)s] %(message)s",
level=logging.INFO,
filename=cfg.logfile)
# You can make the output more or less verbose by setting level to logging.DEBUG, logging.INFO, logging.WARNING, or logging.ERROR
else:
logging.basicConfig(format=
"%(relativeCreated)12d [%(filename)s:%(funcName)20s():%(lineno)s][%(process)d] %(message)s",
level=logging.WARNING)
"[%(filename)s:%(funcName)20s():%(lineno)s] %(message)s",
level=logging.INFO)

opts = cnmf.params.CNMFParams(params_from_file=cfg.configfile)

Expand Down
8 changes: 4 additions & 4 deletions demos/general/demo_behavior.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@ def main():

if cfg.logfile:
logging.basicConfig(format=
"%(relativeCreated)12d [%(filename)s:%(funcName)20s():%(lineno)s][%(process)d] %(message)s",
level=logging.WARNING,
"[%(filename)s:%(funcName)20s():%(lineno)s] %(message)s",
level=logging.INFO,
filename=cfg.logfile)
# You can make the output more or less verbose by setting level to logging.DEBUG, logging.INFO, logging.WARNING, or logging.ERROR
else:
logging.basicConfig(format=
"%(relativeCreated)12d [%(filename)s:%(funcName)20s():%(lineno)s][%(process)d] %(message)s",
level=logging.WARNING)
"[%(filename)s:%(funcName)20s():%(lineno)s] %(message)s",
level=logging.INFO)

if cfg.input is None:
# If no input is specified, use sample data, downloading if necessary
Expand Down
8 changes: 4 additions & 4 deletions demos/general/demo_caiman_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,14 @@ def main():

if cfg.logfile:
logging.basicConfig(format=
"%(relativeCreated)12d [%(filename)s:%(funcName)20s():%(lineno)s][%(process)d] %(message)s",
level=logging.WARNING,
"[%(filename)s:%(funcName)20s():%(lineno)s] %(message)s",
level=logging.INFO,
filename=cfg.logfile)
# You can make the output more or less verbose by setting level to logging.DEBUG, logging.INFO, logging.WARNING, or logging.ERROR
else:
logging.basicConfig(format=
"%(relativeCreated)12d [%(filename)s:%(funcName)20s():%(lineno)s][%(process)d] %(message)s",
level=logging.WARNING)
"[%(filename)s:%(funcName)20s():%(lineno)s] %(message)s",
level=logging.INFO)

opts = params.CNMFParams(params_from_file=cfg.configfile)

Expand Down
8 changes: 4 additions & 4 deletions demos/general/demo_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,14 @@ def main():

if cfg.logfile:
logging.basicConfig(format=
"%(relativeCreated)12d [%(filename)s:%(funcName)20s():%(lineno)s][%(process)d] %(message)s",
level=logging.WARNING,
"[%(filename)s:%(funcName)20s():%(lineno)s] %(message)s",
level=logging.INFO,
filename=cfg.logfile)
# You can make the output more or less verbose by setting level to logging.DEBUG, logging.INFO, logging.WARNING, or logging.ERROR
else:
logging.basicConfig(format=
"%(relativeCreated)12d [%(filename)s:%(funcName)20s():%(lineno)s][%(process)d] %(message)s",
level=logging.WARNING)
"[%(filename)s:%(funcName)20s():%(lineno)s] %(message)s",
level=logging.INFO)

# First set up some parameters for data and motion correction
opts = params.CNMFParams(params_from_file=cfg.configfile)
Expand Down
8 changes: 4 additions & 4 deletions demos/general/demo_pipeline_NWB.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,14 @@ def main():

if cfg.logfile:
logging.basicConfig(format=
"%(relativeCreated)12d [%(filename)s:%(funcName)20s():%(lineno)s][%(process)d] %(message)s",
level=logging.WARNING,
"[%(filename)s:%(funcName)20s():%(lineno)s] %(message)s",
level=logging.INFO,
filename=cfg.logfile)
# You can make the output more or less verbose by setting level to logging.DEBUG, logging.INFO, logging.WARNING, or logging.ERROR
else:
logging.basicConfig(format=
"%(relativeCreated)12d [%(filename)s:%(funcName)20s():%(lineno)s][%(process)d] %(message)s",
level=logging.WARNING)
"[%(filename)s:%(funcName)20s():%(lineno)s] %(message)s",
level=logging.INFO)

opts = params.CNMFParams(params_from_file=cfg.configfile)
if cfg.input is not None:
Expand Down
8 changes: 4 additions & 4 deletions demos/general/demo_pipeline_cnmfE.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,14 @@ def main():

if cfg.logfile:
logging.basicConfig(format=
"%(relativeCreated)12d [%(filename)s:%(funcName)20s():%(lineno)s][%(process)d] %(message)s",
level=logging.WARNING,
"[%(filename)s:%(funcName)20s():%(lineno)s] %(message)s",
level=logging.INFO,
filename=cfg.logfile)
# You can make the output more or less verbose by setting level to logging.DEBUG, logging.INFO, logging.WARNING, or logging.ERROR
else:
logging.basicConfig(format=
"%(relativeCreated)12d [%(filename)s:%(funcName)20s():%(lineno)s][%(process)d] %(message)s",
level=logging.WARNING)
"[%(filename)s:%(funcName)20s():%(lineno)s] %(message)s",
level=logging.INFO)

if cfg.input is None:
# If no input is specified, use sample data, downloading if necessary
Expand Down
8 changes: 4 additions & 4 deletions demos/general/demo_pipeline_voltage_imaging.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,14 @@ def main():

if cfg.logfile:
logging.basicConfig(format=
"%(relativeCreated)12d [%(filename)s:%(funcName)20s():%(lineno)s][%(process)d] %(message)s",
level=logging.WARNING,
"[%(filename)s:%(funcName)20s():%(lineno)s] %(message)s",
level=logging.INFO,
filename=cfg.logfile)
# You can make the output more or less verbose by setting level to logging.DEBUG, logging.INFO, logging.WARNING, or logging.ERROR
else:
logging.basicConfig(format=
"%(relativeCreated)12d [%(filename)s:%(funcName)20s():%(lineno)s][%(process)d] %(message)s",
level=logging.WARNING)
"[%(filename)s:%(funcName)20s():%(lineno)s] %(message)s",
level=logging.INFO)

if cfg.input is None:
# If no input is specified, use sample data, downloading if necessary
Expand Down

0 comments on commit 141b2aa

Please sign in to comment.