Add logger to class

This commit is contained in:
Luke Murphy 2021-01-14 19:18:27 +01:00
parent 9a90c17ba9
commit 11692ab64f
No known key found for this signature in database
GPG Key ID: 5E2EF5A63E3718CC

View File

@ -3,7 +3,7 @@
from argparse import ArgumentParser, BooleanOptionalAction
from configparser import ConfigParser
from getpass import getpass
from logging import DEBUG, INFO, basicConfig
from logging import DEBUG, INFO, basicConfig, getLogger
from os import environ
from os.path import exists
from pathlib import Path
@ -79,6 +79,7 @@ class Bot(ClientXMPP):
basicConfig(
level=self.args.log_level, format="%(levelname)-8s %(message)s"
)
self.log = getLogger(__name__)
def read_config(self):
"""Read configuration for running bot."""