Skip to content

Commit 97e70c7

Browse files
committed
Added warning message when setup_logging.setup_logging() cannot send output to stdout and stderr.
1 parent b711923 commit 97e70c7

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

labscript_utils/setup_logging.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
import sys, os
1414
from io import UnsupportedOperation
1515
import logging, logging.handlers
16+
import warnings
1617
from labscript_utils.ls_zprocess import Handler, ensure_connected_to_zlog
1718

1819

@@ -73,6 +74,8 @@ def setup_logging(program_name, log_level=logging.DEBUG, terminal_level=logging.
7374
except UnsupportedOperation:
7475
# Special handling for Jupyter notebook kernels where sys.stdout.fileno is not
7576
# callable.
76-
pass
77+
warnings.warn(
78+
"Logging to stdout and stderr is disabled. See the log files for log messages."
79+
)
7780
logger.setLevel(logging.DEBUG)
7881
return logger

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy