Fixed bugs
This commit is contained in:
parent
cf4411e7ae
commit
7fcdc950fc
Binary file not shown.
Binary file not shown.
|
@ -5,8 +5,8 @@ import os, logging
|
|||
|
||||
|
||||
class Logger:
|
||||
def __init__(self):
|
||||
pass
|
||||
def __init__(self, config_path):
|
||||
self._CONFIG_PATH = config_path
|
||||
|
||||
def get_logger(self, loggerName = "NO_LOGGER_NAME_PASSED", createFile = True):
|
||||
"""
|
||||
|
@ -42,8 +42,8 @@ class Logger:
|
|||
log.addHandler(ch)
|
||||
|
||||
if createFile:
|
||||
folder = "logs"
|
||||
file = folder + "/application.log"
|
||||
folder = self._CONFIG_PATH
|
||||
file = f"{folder}/application.log"
|
||||
|
||||
if not os.path.exists(folder):
|
||||
os.mkdir(folder)
|
||||
|
|
|
@ -29,7 +29,7 @@ class Settings:
|
|||
self._XSCREEN_SAVERS = "/usr/lib/xscreensaver/"
|
||||
|
||||
|
||||
self._logger = Logger().get_logger()
|
||||
self._logger = Logger(self._CONFIG_PATH).get_logger()
|
||||
self._builder = Gtk.Builder()
|
||||
self._main_window = None
|
||||
|
||||
|
|
|
@ -1,6 +1,2 @@
|
|||
"""
|
||||
Utils module
|
||||
"""
|
||||
|
||||
from .Logger import Logger
|
||||
from .Settings import Settings
|
||||
|
|
|
@ -5,8 +5,8 @@ import os, logging
|
|||
|
||||
|
||||
class Logger:
|
||||
def __init__(self):
|
||||
pass
|
||||
def __init__(self, config_path):
|
||||
self._CONFIG_PATH = config_path
|
||||
|
||||
def get_logger(self, loggerName = "NO_LOGGER_NAME_PASSED", createFile = True):
|
||||
"""
|
||||
|
@ -42,8 +42,8 @@ class Logger:
|
|||
log.addHandler(ch)
|
||||
|
||||
if createFile:
|
||||
folder = "logs"
|
||||
file = folder + "/application.log"
|
||||
folder = self._CONFIG_PATH
|
||||
file = f"{folder}/application.log"
|
||||
|
||||
if not os.path.exists(folder):
|
||||
os.mkdir(folder)
|
||||
|
|
|
@ -29,7 +29,7 @@ class Settings:
|
|||
self._XSCREEN_SAVERS = "/usr/lib/xscreensaver/"
|
||||
|
||||
|
||||
self._logger = Logger().get_logger()
|
||||
self._logger = Logger(self._CONFIG_PATH).get_logger()
|
||||
self._builder = Gtk.Builder()
|
||||
self._main_window = None
|
||||
|
||||
|
|
|
@ -1,6 +1,2 @@
|
|||
"""
|
||||
Utils module
|
||||
"""
|
||||
|
||||
from .Logger import Logger
|
||||
from .Settings import Settings
|
||||
|
|
Loading…
Reference in New Issue