Compare commits

..

2 commits

Author SHA1 Message Date
Emma Nora Theuer
c9b76190f0 Adjust version number 2024-06-20 17:57:31 +02:00
Emma Nora Theuer
c6c4ba5a48 Adjust default loglevel. 2024-06-20 17:57:20 +02:00
3 changed files with 4 additions and 4 deletions

View file

@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
[project] [project]
name = "wallman" name = "wallman"
version = "1.3.3.1" version = "1.3.3.2"
authors = [ authors = [
{name = "Emma Nora Theuer", email = "wallman@entheuer.de"}, {name = "Emma Nora Theuer", email = "wallman@entheuer.de"},
] ]

View file

@ -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.

View file

@ -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)