Skip to content

Commit

Permalink
Updated development mode loading for logger
Browse files Browse the repository at this point in the history
  • Loading branch information
morington committed May 8, 2024
1 parent 58800b0 commit 0c72d44
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 10 deletions.
11 changes: 7 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,22 @@
# Changelog
---

# v0.0.4a
# v0.0.5.*a
- Fixing bugs with loading environment variables
- Adding a `scheme` parameter for services to the configuration
- Updated development mode loading for logger

---

# v0.0.3.*a
- Fixing bugs with console scripts
# v0.0.4a
- Fixing bugs with loading environment variables
- Adding a `scheme` parameter for services to the configuration

---

# v0.0.3a
# v0.0.3.*a
- Instructions for installation and use are written in README.md
- Fixing bugs with console scripts

---

Expand Down
2 changes: 1 addition & 1 deletion confhub/__meta__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.0.5a"
__version__ = "0.0.5.1a"
11 changes: 6 additions & 5 deletions confhub/reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,6 @@ def __init__(
:param dev: Local priority for configuration determination,
:param logger_registrations: Logger configuration, default: LoggerReg(name="", level=LoggerReg.Level.DEBUG)
"""
if logger_registrations is None:
logger_registrations = [LoggerReg(name="", level=LoggerReg.Level.DEBUG)]

SetupLogger(name_registration=logger_registrations, default_development=dev)

self.dev = dev
PathError.checking_paths(*paths)
settings_files = [*paths]
Expand All @@ -69,6 +64,12 @@ def __init__(

self.data = self.data_export(data=__data)

logger.debug('Loading logger parameters...')
if logger_registrations is None:
logger_registrations = [LoggerReg(name="", level=LoggerReg.Level.DEBUG)]

SetupLogger(name_registration=logger_registrations, default_development=self.dev or self.is_dev)

def data_export(self, data: LazySettings) -> dict:
"""
Returns collected data in dictionary format
Expand Down

0 comments on commit 0c72d44

Please sign in to comment.