Skip to content

Commit

Permalink
Merge pull request #10 from spacemansteve/master
Browse files Browse the repository at this point in the history
#9 update log file config so it matches other microservices
  • Loading branch information
spacemansteve authored Oct 28, 2016
2 parents c2e24f1 + daa1a98 commit e4d786d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,5 @@ docs/_build/

# PyBuilder
target/

*~
7 changes: 5 additions & 2 deletions orcid_service/config.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import os

APP_SECRET_KEY = 'fake'
VERSION = 'v0.1' # Arbitrary string identifying the service (will be returned in the headers)

Expand All @@ -12,6 +14,7 @@
}
SQLALCHEMY_ECHO = False

ENVIRONMENT = os.getenv('ENVIRONMENT', 'staging').lower()
ORCID_LOGGING = {
'version': 1,
'disable_existing_loggers': False,
Expand All @@ -27,7 +30,7 @@
'formatter': 'default',
'level': 'INFO',
'class': 'logging.handlers.TimedRotatingFileHandler',
'filename': '/tmp/orcid_service_app.log',
'filename': '/tmp/orcid.app.{}.log'.format(ENVIRONMENT),
},
'console': {
'formatter': 'default',
Expand All @@ -37,7 +40,7 @@
},
'loggers': {
'': {
'handlers': ['file', 'console'],
'handlers': ['file'],
'level': 'INFO',
'propagate': True,
},
Expand Down

0 comments on commit e4d786d

Please sign in to comment.