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