mirror of
https://github.com/Xevion/phototag.git
synced 2026-01-31 00:25:03 -06:00
filter logging down to project-only loggers, improve logging format and add colored-traceback
This commit is contained in:
@@ -10,8 +10,12 @@ import os
|
||||
|
||||
from . import config
|
||||
|
||||
log = logging.getLogger("init")
|
||||
log.setLevel(logging.INFO)
|
||||
logging.basicConfig(
|
||||
format='[%(asctime)s] [%(name)s] [%(levelname)s] %(message)s',
|
||||
level=logging.ERROR
|
||||
)
|
||||
logger = logging.getLogger(__name__)
|
||||
logger.setLevel(logging.INFO)
|
||||
|
||||
# Path Constants
|
||||
ROOT = os.getcwd()
|
||||
@@ -19,7 +23,7 @@ INPUT_PATH = ROOT
|
||||
SCRIPT_ROOT = os.path.dirname(os.path.realpath(__file__))
|
||||
TEMP_PATH = os.path.join(ROOT, "temp")
|
||||
OUTPUT_PATH = os.path.join(ROOT, "output")
|
||||
log.info("Path constants built successfully...")
|
||||
logger.info("Path constants built successfully...")
|
||||
|
||||
# Environment Variables
|
||||
os.environ["GOOGLE_APPLICATION_CREDENTIALS"] = os.path.join(SCRIPT_ROOT, "config",
|
||||
|
||||
@@ -7,3 +7,4 @@ Pillow>=7.1.0
|
||||
protobuf==3.11.3
|
||||
google-cloud-vision~=2.0
|
||||
google-api-python-client~=1.12.3
|
||||
colored-traceback~=0.3.0
|
||||
|
||||
Reference in New Issue
Block a user