API - add log file
This commit is contained in:
parent
b44a2cef53
commit
39cc65855a
@ -4,6 +4,7 @@ WORKERS_PROCESSES = 1
|
||||
export DATABASE_URL = postgres://fittrackee:fittrackee@$(HOST):5432/fittrackee
|
||||
export DATABASE_TEST_URL = postgres://fittrackee:fittrackee@$(HOST):5432/fittrackee_test
|
||||
export APP_SETTINGS=fittrackee.config.DevelopmentConfig
|
||||
export APP_LOG=fittrackee.log
|
||||
export DATABASE_DISABLE_POOLING=True
|
||||
export TILE_SERVER_URL=
|
||||
export MAP_ATTRIBUTION=
|
||||
|
@ -15,6 +15,12 @@ bcrypt = Bcrypt()
|
||||
migrate = Migrate()
|
||||
email_service = Email()
|
||||
dramatiq = Dramatiq()
|
||||
log_file = os.getenv('APP_LOG')
|
||||
logging.basicConfig(
|
||||
filename=log_file,
|
||||
format='%(asctime)s - %(name)s - %(levelname)s - ' '%(message)s',
|
||||
datefmt='%Y/%m/%d %H:%M:%S',
|
||||
)
|
||||
appLog = logging.getLogger('fittrackee')
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user