Michal Kobus | e7589f7 | 2020-09-11 14:29:37 +0200 | [diff] [blame^] | 1 | import os |
| 2 | |
Michal Kobus | 819cf02 | 2018-11-29 16:39:22 +0100 | [diff] [blame] | 3 | VERSION = 'production' |
| 4 | |
Michal Kobus | 17726ae | 2018-11-27 12:59:55 +0100 | [diff] [blame] | 5 | LOGGING = { |
| 6 | 'version': 1, |
| 7 | 'formatters': {'default': { |
| 8 | 'format': '[%(asctime)s] %(levelname)s in %(module)s: %(message)s', |
| 9 | }}, |
| 10 | 'handlers': { |
| 11 | 'wsgi': { |
| 12 | 'class': 'logging.StreamHandler', |
| 13 | 'stream': 'ext://flask.logging.wsgi_errors_stream', |
| 14 | 'formatter': 'default' |
| 15 | }, |
| 16 | 'file': { |
| 17 | 'class': 'logging.handlers.RotatingFileHandler', |
| 18 | 'formatter': 'default', |
| 19 | 'filename': '/var/log/sf-notifier/sfnotifier.log', |
| 20 | 'mode': 'a', |
| 21 | 'maxBytes': 10485760, |
| 22 | 'backupCount': 5 |
| 23 | } |
| 24 | }, |
| 25 | 'loggers': { |
| 26 | 'sf_notifier.server': { |
Michal Kobus | afbf4d0 | 2018-11-28 14:18:05 +0100 | [diff] [blame] | 27 | 'level': 'INFO', |
Michal Kobus | 17726ae | 2018-11-27 12:59:55 +0100 | [diff] [blame] | 28 | 'handlers': ['file', 'wsgi'] |
| 29 | }, |
| 30 | 'sf_notifier.salesforce.client': { |
Michal Kobus | afbf4d0 | 2018-11-28 14:18:05 +0100 | [diff] [blame] | 31 | 'level': 'INFO', |
Michal Kobus | 17726ae | 2018-11-27 12:59:55 +0100 | [diff] [blame] | 32 | 'handlers': ['file', 'wsgi'] |
| 33 | } |
| 34 | } |
| 35 | } |
| 36 | |
| 37 | SIMPLE_SETTINGS = { |
| 38 | 'OVERRIDE_BY_ENV': True, |
| 39 | 'CONFIGURE_LOGGING': True, |
| 40 | } |
| 41 | |
Michal Kobus | e7589f7 | 2020-09-11 14:29:37 +0200 | [diff] [blame^] | 42 | ADD_LINKS = os.environ.get('SF_NOTIFIER_ADD_LINKS', |
| 43 | False) in ['true', 'True', True] |
| 44 | |
Michal Kobus | 17726ae | 2018-11-27 12:59:55 +0100 | [diff] [blame] | 45 | SF_CONFIG = {} |