Skip to content

Commit 78aa95c

Browse files
committed
Remove ability to modify logging levels
Summary: Logging levels were used inconsistently and would cause problems with multithreaded servers. We remove this ability. Test Plan: Tests updated.
1 parent f072aa8 commit 78aa95c

19 files changed

+25
-21
lines changed

aepsych/benchmark/pathos_benchmark.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
ctx._force_start_method("spawn") # fixes problems with CUDA and fork
2727

28-
logger = utils_logging.getLogger(logging.INFO)
28+
logger = utils_logging.getLogger()
2929

3030

3131
class PathosBenchmark(Benchmark):

aepsych/server/message_handlers/handle_ask.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
import aepsych.utils_logging as utils_logging
1212

13-
logger = utils_logging.getLogger(logging.INFO)
13+
logger = utils_logging.getLogger()
1414

1515

1616
def handle_ask(server, request):

aepsych/server/message_handlers/handle_can_model.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
import aepsych.utils_logging as utils_logging
1111

12-
logger = utils_logging.getLogger(logging.INFO)
12+
logger = utils_logging.getLogger()
1313

1414

1515
def handle_can_model(server, request):

aepsych/server/message_handlers/handle_exit.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
import aepsych.utils_logging as utils_logging
1111

12-
logger = utils_logging.getLogger(logging.INFO)
12+
logger = utils_logging.getLogger()
1313

1414

1515
def handle_exit(server, request):

aepsych/server/message_handlers/handle_get_config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
import aepsych.utils_logging as utils_logging
1010

11-
logger = utils_logging.getLogger(logging.INFO)
11+
logger = utils_logging.getLogger()
1212

1313

1414
def handle_get_config(server, request):

aepsych/server/message_handlers/handle_info.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
import aepsych.utils_logging as utils_logging
1212

13-
logger = utils_logging.getLogger(logging.INFO)
13+
logger = utils_logging.getLogger()
1414

1515

1616
def handle_info(server, request: Dict[str, Any]) -> Dict[str, Any]:

aepsych/server/message_handlers/handle_params.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
import aepsych.utils_logging as utils_logging
1111

12-
logger = utils_logging.getLogger(logging.INFO)
12+
logger = utils_logging.getLogger()
1313

1414

1515
def handle_params(server, request):

aepsych/server/message_handlers/handle_query.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
import numpy as np
1212
import torch
1313

14-
logger = utils_logging.getLogger(logging.INFO)
14+
logger = utils_logging.getLogger()
1515

1616

1717
def handle_query(server, request):

aepsych/server/message_handlers/handle_resume.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
import aepsych.utils_logging as utils_logging
1111

12-
logger = utils_logging.getLogger(logging.INFO)
12+
logger = utils_logging.getLogger()
1313

1414

1515
def handle_resume(server, request):

aepsych/server/message_handlers/handle_setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
from aepsych.strategy import SequentialStrategy
1515
from aepsych.version import __version__
1616

17-
logger = utils_logging.getLogger(logging.INFO)
17+
logger = utils_logging.getLogger()
1818

1919

2020
def _configure(server, config):

0 commit comments

Comments
 (0)