Adjust default loglevel.
This commit is contained in:
parent
4aa7aa8577
commit
c6c4ba5a48
2 changed files with 3 additions and 3 deletions
|
@ -6,7 +6,7 @@ used_sets = ["anime", "nature"]
|
||||||
wallpapers_per_set = 5
|
wallpapers_per_set = 5
|
||||||
notify = False
|
notify = False
|
||||||
fallback_wallpaper = "/path/to/paper"
|
fallback_wallpaper = "/path/to/paper"
|
||||||
loglevel = "WARNING"
|
loglevel = "INFO"
|
||||||
|
|
||||||
# Enter the hours at which you want the wallpaper to change.
|
# Enter the hours at which you want the wallpaper to change.
|
||||||
# If the script is called between one of this times, it will go back to the previous time.
|
# If the script is called between one of this times, it will go back to the previous time.
|
||||||
|
|
|
@ -30,7 +30,7 @@ class _ConfigLib:
|
||||||
self.config_used_sets: list = self.config_general["used_sets"]
|
self.config_used_sets: list = self.config_general["used_sets"]
|
||||||
self.config_wallpapers_per_set: int = self.config_general["wallpapers_per_set"]
|
self.config_wallpapers_per_set: int = self.config_general["wallpapers_per_set"]
|
||||||
self.config_total_changing_times: int = len(self.config_changing_times)
|
self.config_total_changing_times: int = len(self.config_changing_times)
|
||||||
self.config_log_level: str = self.config_general.get("loglevel", "WARNING").upper()
|
self.config_log_level: str = self.config_general.get("loglevel", "INFO").upper()
|
||||||
try:
|
try:
|
||||||
self.config_notify: bool = self.config_general["notify"]
|
self.config_notify: bool = self.config_general["notify"]
|
||||||
except KeyError:
|
except KeyError:
|
||||||
|
@ -44,7 +44,7 @@ class _ConfigLib:
|
||||||
global logging
|
global logging
|
||||||
global logger
|
global logger
|
||||||
chdir(str(getenv("HOME")) + "/.local/share/wallman/")
|
chdir(str(getenv("HOME")) + "/.local/share/wallman/")
|
||||||
numeric_level = getattr(logging, self.config_log_level, logging.WARNING)
|
numeric_level = getattr(logging, self.config_log_level, logging.INFO)
|
||||||
logger.setLevel(numeric_level)
|
logger.setLevel(numeric_level)
|
||||||
logging.basicConfig(filename="wallman.log", encoding="utf-8", level=numeric_level)
|
logging.basicConfig(filename="wallman.log", encoding="utf-8", level=numeric_level)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue