Skip to content

Commit badf308

Browse files
committed
configure SIR and tweak logging
1 parent 076f460 commit badf308

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

spells/config.py

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"WOE",
1212
"LTR",
1313
"MOM",
14+
"SIR",
1415
"ONE",
1516
"BRO",
1617
"DMU",

spells/log.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,12 @@ def console_logging(log_level):
6363
logger.removeHandler(console_handler)
6464

6565

66-
def make_verbose(level: int = logging.ERROR) -> Callable:
66+
def make_verbose(level: int | None = None) -> Callable:
6767
def decorator(func: Callable) -> Callable:
6868
@wraps(func)
69-
def wrapped(*args, log_to_console: int = level, **kwargs):
69+
def wrapped(*args, log_to_console: int | None = level, **kwargs):
70+
if log_to_console is None:
71+
return func(*args, **kwargs)
7072
with console_logging(log_to_console):
7173
return func(*args, **kwargs)
7274

0 commit comments

Comments
 (0)