-
Notifications
You must be signed in to change notification settings - Fork 3
/
production.ini
93 lines (73 loc) · 2.2 KB
/
production.ini
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
###
# app configuration
# http://docs.pylonsproject.org/projects/pyramid/en/1.6-branch/narr/environment.html
# this file should be used by gunicorn.
###
[app:app]
use = egg:c2cwsgiutils_app
pyramid.reload_templates = %(DEVELOPMENT)s
pyramid.debug_authorization = %(DEVELOPMENT)s
pyramid.debug_notfound = %(DEVELOPMENT)s
pyramid.debug_routematch = %(DEVELOPMENT)s
pyramid.default_locale_name = en
sqlalchemy.url = %(SQLALCHEMY_URL)s
sqlalchemy.pool_recycle = %(SQLALCHEMY_POOL_RECYCLE)s
sqlalchemy.pool_size = %(SQLALCHEMY_POOL_SIZE)s
sqlalchemy.max_overflow = %(SQLALCHEMY_MAX_OVERFLOW)s
sqlalchemy_slave.url = %(SQLALCHEMY_SLAVE_URL)s
sqlalchemy_slave.pool_recycle = %(SQLALCHEMY_SLAVE_POOL_RECYCLE)s
sqlalchemy_slave.pool_size = %(SQLALCHEMY_SLAVE_POOL_SIZE)s
sqlalchemy_slave.max_overflow = %(SQLALCHEMY_SLAVE_MAX_OVERFLOW)s
c2c.sql_request_id = True
c2c.requests_default_timeout = 2
[pipeline:main]
pipeline = egg:c2cwsgiutils#client_info egg:c2cwsgiutils#sentry app
[server:main]
use = egg:waitress#main
listen = *:8080
###
# logging configuration
# http://docs.pylonsproject.org/projects/pyramid/en/latest/narr/logging.html
###
[loggers]
keys = root, gunicorn, sqlalchemy, c2cwsgiutils, c2cwsgiutils_app
[handlers]
keys = console, json
[formatters]
keys = generic
[logger_root]
level = %(OTHER_LOG_LEVEL)s
handlers = %(LOG_TYPE)s
[logger_gunicorn]
level = %(GUNICORN_LOG_LEVEL)s
handlers =
qualname = gunicorn.error
# "level = INFO" logs SQL queries.
# "level = DEBUG" logs SQL queries and results.
# "level = WARNING" logs neither. (Recommended for production systems.)
[logger_sqlalchemy]
level = %(SQL_LOG_LEVEL)s
handlers =
qualname = sqlalchemy.engine
[logger_c2cwsgiutils]
level = %(C2CWSGIUTILS_LOG_LEVEL)s
handlers =
qualname = c2cwsgiutils
[logger_c2cwsgiutils_app]
level = %(LOG_LEVEL)s
handlers =
qualname = c2cwsgiutils_app
[handler_console]
class = logging.StreamHandler
kwargs = {'stream': 'ext://sys.stdout'}
level = NOTSET
formatter = generic
[handler_json]
class = c2cwsgiutils.pyramid_logging.JsonLogHandler
kwargs = {'stream': 'ext://sys.stdout'}
level = NOTSET
formatter = generic
[formatter_generic]
format = %(levelname)-5.5s %(name)s %(message)s
datefmt = [%Y-%m-%d %H:%M:%S %z]
class = logging.Formatter