From abe767a174ae02612695c0421d0aa0e1b93142be Mon Sep 17 00:00:00 2001 From: Pat Gunn Date: Tue, 6 Aug 2024 10:05:24 -0400 Subject: [PATCH] notebooks: fix issue where we didn't turn format string into object --- demos/notebooks/demo_OnACID_mesoscope.ipynb | 2 +- demos/notebooks/demo_Ring_CNN.ipynb | 2 +- demos/notebooks/demo_VST.ipynb | 2 +- demos/notebooks/demo_caiman_cnmf_3D.ipynb | 2 +- demos/notebooks/demo_dendritic.ipynb | 2 +- demos/notebooks/demo_motion_correction.ipynb | 2 +- demos/notebooks/demo_online_3D.ipynb | 2 +- demos/notebooks/demo_online_cnmfE.ipynb | 2 +- demos/notebooks/demo_pipeline.ipynb | 2 +- demos/notebooks/demo_pipeline_cnmfE.ipynb | 2 +- demos/notebooks/demo_pipeline_voltage_imaging.ipynb | 2 +- demos/notebooks/demo_realtime_cnmfE.ipynb | 2 +- demos/notebooks/demo_seeded_CNMF.ipynb | 2 +- 13 files changed, 13 insertions(+), 13 deletions(-) diff --git a/demos/notebooks/demo_OnACID_mesoscope.ipynb b/demos/notebooks/demo_OnACID_mesoscope.ipynb index cca9bb663..015e54334 100644 --- a/demos/notebooks/demo_OnACID_mesoscope.ipynb +++ b/demos/notebooks/demo_OnACID_mesoscope.ipynb @@ -37,7 +37,7 @@ "logfile = None # Replace with a path if you want to log to a file\n", "logger = logging.getLogger('caiman')\n", "logger.setLevel(logging.INFO)\n", - "logfmt = '%(relativeCreated)12d [%(filename)s:%(funcName)20s():%(lineno)s] [%(process)d] %(message)s'\n", + "logfmt = logging.Formatter('%(relativeCreated)12d [%(filename)s:%(funcName)20s():%(lineno)s] [%(process)d] %(message)s')\n", "if logfile is not None:\n", " handler = logging.FileHandler(logfile)\n", "else:\n", diff --git a/demos/notebooks/demo_Ring_CNN.ipynb b/demos/notebooks/demo_Ring_CNN.ipynb index 277d94fb0..2b261b58d 100644 --- a/demos/notebooks/demo_Ring_CNN.ipynb +++ b/demos/notebooks/demo_Ring_CNN.ipynb @@ -26,7 +26,7 @@ "logfile = None # Replace with a path if you want to log to a file\n", "logger = logging.getLogger('caiman')\n", "logger.setLevel(logging.INFO)\n", - "logfmt = '%(relativeCreated)12d [%(filename)s:%(funcName)20s():%(lineno)s] [%(process)d] %(message)s'\n", + "logfmt = logging.Formatter('%(relativeCreated)12d [%(filename)s:%(funcName)20s():%(lineno)s] [%(process)d] %(message)s')\n", "if logfile is not None:\n", " handler = logging.FileHandler(logfile)\n", "else:\n", diff --git a/demos/notebooks/demo_VST.ipynb b/demos/notebooks/demo_VST.ipynb index 295789785..40703c3a4 100644 --- a/demos/notebooks/demo_VST.ipynb +++ b/demos/notebooks/demo_VST.ipynb @@ -27,7 +27,7 @@ "logfile = None # Replace with a path if you want to log to a file\n", "logger = logging.getLogger('caiman')\n", "logger.setLevel(logging.INFO)\n", - "logfmt = '%(relativeCreated)12d [%(filename)s:%(funcName)20s():%(lineno)s] [%(process)d] %(message)s'\n", + "logfmt = logging.Formatter('%(relativeCreated)12d [%(filename)s:%(funcName)20s():%(lineno)s] [%(process)d] %(message)s')\n", "if logfile is not None:\n", " handler = logging.FileHandler(logfile)\n", "else:\n", diff --git a/demos/notebooks/demo_caiman_cnmf_3D.ipynb b/demos/notebooks/demo_caiman_cnmf_3D.ipynb index 0dfea2d00..9503f1a2b 100644 --- a/demos/notebooks/demo_caiman_cnmf_3D.ipynb +++ b/demos/notebooks/demo_caiman_cnmf_3D.ipynb @@ -42,7 +42,7 @@ "logfile = None # Replace with a path if you want to log to a file\n", "logger = logging.getLogger('caiman')\n", "logger.setLevel(logging.INFO)\n", - "logfmt = '%(relativeCreated)12d [%(filename)s:%(funcName)20s():%(lineno)s] [%(process)d] %(message)s'\n", + "logfmt = logging.Formatter('%(relativeCreated)12d [%(filename)s:%(funcName)20s():%(lineno)s] [%(process)d] %(message)s')\n", "if logfile is not None:\n", " handler = logging.FileHandler(logfile)\n", "else:\n", diff --git a/demos/notebooks/demo_dendritic.ipynb b/demos/notebooks/demo_dendritic.ipynb index 49109bb72..1e18d72d2 100644 --- a/demos/notebooks/demo_dendritic.ipynb +++ b/demos/notebooks/demo_dendritic.ipynb @@ -71,7 +71,7 @@ " log_file = None\n", "logger = logging.getLogger('caiman')\n", "logger.setLevel(logging.INFO)\n", - "logfmt = '%(relativeCreated)12d [%(filename)s:%(funcName)20s():%(lineno)s] [%(process)d] %(message)s'\n", + "logfmt = logging.Formatter('%(relativeCreated)12d [%(filename)s:%(funcName)20s():%(lineno)s] [%(process)d] %(message)s')\n", "if log_file is not None:\n", " handler = logging.FileHandler(log_file)\n", "else:\n", diff --git a/demos/notebooks/demo_motion_correction.ipynb b/demos/notebooks/demo_motion_correction.ipynb index 55c98dd2d..9a65e159e 100644 --- a/demos/notebooks/demo_motion_correction.ipynb +++ b/demos/notebooks/demo_motion_correction.ipynb @@ -43,7 +43,7 @@ "logfile = None # Replace with a path if you want to log to a file\n", "logger = logging.getLogger('caiman')\n", "logger.setLevel(logging.INFO)\n", - "logfmt = '%(relativeCreated)12d [%(filename)s:%(funcName)20s():%(lineno)s] [%(process)d] %(message)s'\n", + "logfmt = logging.Formatter('%(relativeCreated)12d [%(filename)s:%(funcName)20s():%(lineno)s] [%(process)d] %(message)s')\n", "if logfile is not None:\n", " handler = logging.FileHandler(logfile)\n", "else:\n", diff --git a/demos/notebooks/demo_online_3D.ipynb b/demos/notebooks/demo_online_3D.ipynb index 14906d32a..7f188dc9c 100644 --- a/demos/notebooks/demo_online_3D.ipynb +++ b/demos/notebooks/demo_online_3D.ipynb @@ -39,7 +39,7 @@ "logfile = None # Replace with a path if you want to log to a file\n", "logger = logging.getLogger('caiman')\n", "logger.setLevel(logging.WARNING)\n", - "logfmt = '%(relativeCreated)12d [%(filename)s:%(funcName)20s():%(lineno)s] [%(process)d] %(message)s'\n", + "logfmt = logging.Formatter('%(relativeCreated)12d [%(filename)s:%(funcName)20s():%(lineno)s] [%(process)d] %(message)s')\n", "if logfile is not None:\n", " handler = logging.FileHandler(logfile)\n", "else:\n", diff --git a/demos/notebooks/demo_online_cnmfE.ipynb b/demos/notebooks/demo_online_cnmfE.ipynb index e94a5e389..acb282346 100644 --- a/demos/notebooks/demo_online_cnmfE.ipynb +++ b/demos/notebooks/demo_online_cnmfE.ipynb @@ -39,7 +39,7 @@ "logfile = None # Replace with a path if you want to log to a file\n", "logger = logging.getLogger('caiman')\n", "logger.setLevel(logging.WARNING)\n", - "logfmt = '%(relativeCreated)12d [%(filename)s:%(funcName)20s():%(lineno)s] [%(process)d] %(message)s'\n", + "logfmt = logging.Formatter('%(relativeCreated)12d [%(filename)s:%(funcName)20s():%(lineno)s] [%(process)d] %(message)s')\n", "if logfile is not None:\n", " handler = logging.FileHandler(logfile)\n", "else:\n", diff --git a/demos/notebooks/demo_pipeline.ipynb b/demos/notebooks/demo_pipeline.ipynb index a5a64ab32..b97279f73 100644 --- a/demos/notebooks/demo_pipeline.ipynb +++ b/demos/notebooks/demo_pipeline.ipynb @@ -96,7 +96,7 @@ "logfile = None # Replace with a path if you want to log to a file\n", "logger = logging.getLogger('caiman')\n", "logger.setLevel(logging.WARNING)\n", - "logfmt = '%(relativeCreated)12d [%(filename)s:%(funcName)20s():%(lineno)s] [%(process)d] %(message)s'\n", + "logfmt = logging.Formatter('%(relativeCreated)12d [%(filename)s:%(funcName)20s():%(lineno)s] [%(process)d] %(message)s')\n", "if logfile is not None:\n", " handler = logging.FileHandler(logfile)\n", "else:\n", diff --git a/demos/notebooks/demo_pipeline_cnmfE.ipynb b/demos/notebooks/demo_pipeline_cnmfE.ipynb index 62325fb07..e2ebcd081 100644 --- a/demos/notebooks/demo_pipeline_cnmfE.ipynb +++ b/demos/notebooks/demo_pipeline_cnmfE.ipynb @@ -86,7 +86,7 @@ "logfile = None # Replace with a path if you want to log to a file\n", "logger = logging.getLogger('caiman')\n", "logger.setLevel(logging.WARNING)\n", - "logfmt = '%(relativeCreated)12d [%(filename)s:%(funcName)20s():%(lineno)s] [%(process)d] %(message)s'\n", + "logfmt = logging.Formatter('%(relativeCreated)12d [%(filename)s:%(funcName)20s():%(lineno)s] [%(process)d] %(message)s')\n", "if logfile is not None:\n", " handler = logging.FileHandler(logfile)\n", "else:\n", diff --git a/demos/notebooks/demo_pipeline_voltage_imaging.ipynb b/demos/notebooks/demo_pipeline_voltage_imaging.ipynb index b0a21ea4d..dbd701bd4 100644 --- a/demos/notebooks/demo_pipeline_voltage_imaging.ipynb +++ b/demos/notebooks/demo_pipeline_voltage_imaging.ipynb @@ -63,7 +63,7 @@ "logfile = None # Replace with a path if you want to log to a file\n", "logger = logging.getLogger('caiman')\n", "logger.setLevel(logging.ERROR)\n", - "logfmt = '%(relativeCreated)12d [%(filename)s:%(funcName)20s():%(lineno)s] [%(process)d] %(message)s'\n", + "logfmt = logging.Formatter('%(relativeCreated)12d [%(filename)s:%(funcName)20s():%(lineno)s] [%(process)d] %(message)s')\n", "if logfile is not None:\n", " handler = logging.FileHandler(logfile)\n", "else:\n", diff --git a/demos/notebooks/demo_realtime_cnmfE.ipynb b/demos/notebooks/demo_realtime_cnmfE.ipynb index 378f82510..f5bf8183e 100644 --- a/demos/notebooks/demo_realtime_cnmfE.ipynb +++ b/demos/notebooks/demo_realtime_cnmfE.ipynb @@ -54,7 +54,7 @@ "logfile = None # Replace with a path if you want to log to a file\n", "logger = logging.getLogger('caiman')\n", "logger.setLevel(logging.WARNING)\n", - "logfmt = '%(relativeCreated)12d [%(filename)s:%(funcName)20s():%(lineno)s] [%(process)d] %(message)s'\n", + "logfmt = logging.Formatter('%(relativeCreated)12d [%(filename)s:%(funcName)20s():%(lineno)s] [%(process)d] %(message)s')\n", "if logfile is not None:\n", " handler = logging.FileHandler(logfile)\n", "else:\n", diff --git a/demos/notebooks/demo_seeded_CNMF.ipynb b/demos/notebooks/demo_seeded_CNMF.ipynb index 9c5baa96a..280e00c30 100644 --- a/demos/notebooks/demo_seeded_CNMF.ipynb +++ b/demos/notebooks/demo_seeded_CNMF.ipynb @@ -48,7 +48,7 @@ "logfile = None # Replace with a path if you want to log to a file\n", "logger = logging.getLogger('caiman')\n", "logger.setLevel(logging.WARNING)\n", - "logfmt = '%(relativeCreated)12d [%(filename)s:%(funcName)20s():%(lineno)s] [%(process)d] %(message)s'\n", + "logfmt = logging.Formatter('%(relativeCreated)12d [%(filename)s:%(funcName)20s():%(lineno)s] [%(process)d] %(message)s')\n", "if logfile is not None:\n", " handler = logging.FileHandler(logfile)\n", "else:\n",