Skip to content

Commit

Permalink
Merge pull request pymeasure#1165 from mmerlo/Fix_logger
Browse files Browse the repository at this point in the history
Change logger from root to module-specific logger.
  • Loading branch information
CasperSchippers authored Sep 30, 2024
2 parents bda7fd5 + 6034039 commit c81c91d
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 c81c91d

Please sign in to comment.