From 22b3362c2076b96ddffffa539c5f3279365e0ac7 Mon Sep 17 00:00:00 2001
From: Athanasius <github@miggy.org>
Date: Tue, 22 Sep 2020 15:37:56 +0100
Subject: [PATCH] companion.py: Switch to using EDMCLogging.get_main_logger()

So that we use the correct one for GUI versus CLI.
---
 companion.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/companion.py b/companion.py
index 3be504f4..ee6369eb 100644
--- a/companion.py
+++ b/companion.py
@@ -9,7 +9,6 @@ protocol used for the callback.
 import base64
 import csv
 import hashlib
-import logging
 import numbers
 import os
 import random
@@ -26,9 +25,10 @@ from typing import TYPE_CHECKING, Any, Dict, List, NewType, Union
 import requests
 
 from config import appname, appversion, config
+from EDMCLogging import get_main_logger
 from protocol import protocolhandler
 
-logger = logging.getLogger(appname)
+logger = get_main_logger()
 
 if TYPE_CHECKING:
     _ = lambda x: x  # noqa: E731 # to make flake8 stop complaining that the hacked in _ method doesnt exist