-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
I note that the application will not run in a local environment UNLESS run with a working directory that is the root of the repo.
- Loading branch information
Showing
2 changed files
with
11 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,15 @@ | ||
import importlib.resources | ||
import logging | ||
import logging.config | ||
import os | ||
|
||
logging.config.fileConfig("logging.conf") | ||
try: | ||
logging.config.fileConfig( | ||
"logging.conf" | ||
if os.path.exists("logging.conf") | ||
else importlib.resources.files("imagedephi") / "logging.conf" | ||
) | ||
except KeyError: | ||
pass | ||
|
||
logger = logging.getLogger("root") |