Skip to content

Commit

Permalink
Merge pull request #72 from dictation-toolbox/LexiconCode-log-patch
Browse files Browse the repository at this point in the history
Use named loggers instead of setting root logger in natlinkcore library
  • Loading branch information
LexiconCode authored Apr 1, 2024
2 parents 2dd7df4 + 09108af commit 2146bab
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/natlinkcore/loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -667,7 +667,7 @@ def startDap(config : NatlinkConfig) -> bool:


def run() -> None:
default_logger=logging.getLogger()
default_logger=logging.getLogger("natlink")
dh = OutputDebugStringHandler()
sh=logging.StreamHandler(sys.stdout)
for h in [sh,dh]:
Expand All @@ -688,7 +688,7 @@ def run() -> None:
config = NatlinkConfig.from_first_found_file(config_locations())

dap_started = config.dap_enabled and startDap(config)
logger=logging.getLogger("natlink")
logger=logging.getLogger("natlinkcore")
logger.setLevel(logging.DEBUG)

main = NatlinkMain(logger, config)
Expand All @@ -709,4 +709,4 @@ def run() -> None:
natlink.natConnect()
run()
natlink.natDisconnect()


0 comments on commit 2146bab

Please sign in to comment.