Skip to content

Commit

Permalink
Change logger from root to module-specific logger.
Browse files Browse the repository at this point in the history
  • Loading branch information
mmerlo committed Sep 27, 2024
1 parent bda7fd5 commit 6034039
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pymeasure/experiment/experiment.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
from pymeasure.log import setup_logging, console_log
from pymeasure.experiment import Results, Worker

log = logging.getLogger()
log = logging.getLogger(__name__)
log.addHandler(logging.NullHandler())

try:
Expand Down
2 changes: 1 addition & 1 deletion pymeasure/experiment/procedure.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
from .parameters import Parameter, Measurable, Metadata
from pymeasure.units import ureg

log = logging.getLogger()
log = logging.getLogger(__name__)
log.addHandler(logging.NullHandler())


Expand Down
2 changes: 1 addition & 1 deletion pymeasure/experiment/workers.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def __init__(self, results, log_queue=None, log_level=logging.INFO, port=None):
self.log_level = log_level

global log
log = logging.getLogger()
log = logging.getLogger(__name__)
log.setLevel(self.log_level)
# log.handlers = [] # Remove all other handlers
# log.addHandler(TopicQueueHandler(self.monitor_queue))
Expand Down

0 comments on commit 6034039

Please sign in to comment.