Show More
@@ -1,60 +1,156 b'' | |||
|
1 | # | |
|
2 | # pylons_app - Pylons configuration | |
|
3 | # | |
|
4 | # The %(here)s variable will be replaced with the parent directory of this file | |
|
5 | # | |
|
1 | ################################################################################ | |
|
2 | ################################################################################ | |
|
3 | # hg-app - Pylons environment configuration # | |
|
4 | # # | |
|
5 | # The %(here)s variable will be replaced with the parent directory of this file# | |
|
6 | ################################################################################ | |
|
7 | ||
|
6 | 8 | [DEFAULT] |
|
7 | 9 | debug = true |
|
8 | email_to = you@yourdomain.com | |
|
9 | smtp_server = localhost | |
|
10 | error_email_from = paste@localhost | |
|
10 | ############################################ | |
|
11 | ## Uncomment and replace with the address ## | |
|
12 | ## which should receive any error reports ## | |
|
13 | ############################################ | |
|
14 | #email_to = admin@localhost | |
|
15 | #smtp_server = mail.server.com | |
|
16 | #error_email_from = paste_error@localhost | |
|
17 | #smtp_username = | |
|
18 | #smtp_password = | |
|
19 | #error_message = 'hp-app crash !' | |
|
11 | 20 | |
|
12 | 21 | [server:main] |
|
22 | ##nr of threads to spawn | |
|
23 | threadpool_workers = 5 | |
|
24 | ||
|
25 | ##max request before thread respawn | |
|
26 | threadpool_max_requests = 2 | |
|
27 | ||
|
28 | ##option to use threads of process | |
|
29 | use_threadpool = true | |
|
30 | ||
|
13 | 31 | use = egg:Paste#http |
|
14 |
host = |
|
|
15 |
port = |
|
|
32 | host = 127.0.0.1 | |
|
33 | port = 8001 | |
|
16 | 34 | |
|
17 | 35 | [app:main] |
|
18 | 36 | use = egg:pylons_app |
|
19 | 37 | full_stack = true |
|
20 |
static_files = |
|
|
21 | ||
|
38 | static_files = false | |
|
39 | lang=en | |
|
22 | 40 | cache_dir = %(here)s/data |
|
23 | beaker.session.key = pylons_app | |
|
24 | beaker.session.secret = ${app_instance_secret} | |
|
25 | 41 | app_instance_uuid = ${app_instance_uuid} |
|
26 | 42 | |
|
27 | # If you'd like to fine-tune the individual locations of the cache data dirs | |
|
28 | # for the Cache data, or the Session saves, un-comment the desired settings | |
|
29 | # here: | |
|
30 |
|
|
|
31 |
|
|
|
43 | #################################### | |
|
44 | ### BEAKER CACHE #### | |
|
45 | #################################### | |
|
46 | beaker.cache.data_dir=/%(here)s/data/cache/data | |
|
47 | beaker.cache.lock_dir=/%(here)s/data/cache/lock | |
|
48 | beaker.cache.regions=super_short_term,short_term,long_term | |
|
49 | beaker.cache.long_term.type=memory | |
|
50 | beaker.cache.long_term.expire=36000 | |
|
51 | beaker.cache.short_term.type=memory | |
|
52 | beaker.cache.short_term.expire=60 | |
|
53 | beaker.cache.super_short_term.type=memory | |
|
54 | beaker.cache.super_short_term.expire=10 | |
|
32 | 55 | |
|
33 | # WARNING: *THE LINE BELOW MUST BE UNCOMMENTED ON A PRODUCTION ENVIRONMENT* | |
|
34 | # Debug mode will enable the interactive debugging tool, allowing ANYONE to | |
|
35 | # execute malicious code after an exception is raised. | |
|
56 | #################################### | |
|
57 | ### BEAKER SESSION #### | |
|
58 | #################################### | |
|
59 | ## Type of storage used for the session, current types are | |
|
60 | ## dbm, file, memcached, database, and memory. | |
|
61 | ## The storage uses the Container API | |
|
62 | ##that is also used by the cache system. | |
|
63 | beaker.session.type = file | |
|
64 | ||
|
65 | beaker.session.key = hg-app | |
|
66 | beaker.session.secret = ${app_instance_secret} | |
|
67 | beaker.session.timeout = 36000 | |
|
68 | ||
|
69 | ##auto save the session to not to use .save() | |
|
70 | beaker.session.auto = False | |
|
71 | ||
|
72 | ##true exire at browser close | |
|
73 | #beaker.session.cookie_expires = 3600 | |
|
74 | ||
|
75 | ||
|
76 | ################################################################################ | |
|
77 | ## WARNING: *THE LINE BELOW MUST BE UNCOMMENTED ON A PRODUCTION ENVIRONMENT* ## | |
|
78 | ## Debug mode will enable the interactive debugging tool, allowing ANYONE to ## | |
|
79 | ## execute malicious code after an exception is raised. ## | |
|
80 | ################################################################################ | |
|
36 | 81 | set debug = false |
|
37 | 82 | |
|
83 | ################################## | |
|
84 | ### LOGVIEW CONFIG ### | |
|
85 | ################################## | |
|
86 | logview.sqlalchemy = #faa | |
|
87 | logview.pylons.templating = #bfb | |
|
88 | logview.pylons.util = #eee | |
|
38 | 89 | |
|
39 | # Logging configuration | |
|
90 | ######################################################### | |
|
91 | ### DB CONFIGS - EACH DB WILL HAVE IT'S OWN CONFIG ### | |
|
92 | ######################################################### | |
|
93 | sqlalchemy.db1.url = sqlite:///%(here)s/hg_app.db | |
|
94 | #sqlalchemy.db1.echo = False | |
|
95 | #sqlalchemy.db1.pool_recycle = 3600 | |
|
96 | sqlalchemy.convert_unicode = true | |
|
97 | ||
|
98 | ################################ | |
|
99 | ### LOGGING CONFIGURATION #### | |
|
100 | ################################ | |
|
40 | 101 | [loggers] |
|
41 | keys = root | |
|
102 | keys = root, routes, pylons_app, sqlalchemy | |
|
42 | 103 | |
|
43 | 104 | [handlers] |
|
44 | 105 | keys = console |
|
45 | 106 | |
|
46 | 107 | [formatters] |
|
47 | keys = generic | |
|
108 | keys = generic,color_formatter | |
|
48 | 109 | |
|
110 | ############# | |
|
111 | ## LOGGERS ## | |
|
112 | ############# | |
|
49 | 113 | [logger_root] |
|
50 | 114 | level = INFO |
|
51 | 115 | handlers = console |
|
52 | 116 | |
|
117 | [logger_routes] | |
|
118 | level = INFO | |
|
119 | handlers = console | |
|
120 | qualname = routes.middleware | |
|
121 | # "level = DEBUG" logs the route matched and routing variables. | |
|
122 | ||
|
123 | [logger_pylons_app] | |
|
124 | level = DEBUG | |
|
125 | handlers = console | |
|
126 | qualname = pylons_app | |
|
127 | propagate = 0 | |
|
128 | ||
|
129 | [logger_sqlalchemy] | |
|
130 | level = ERROR | |
|
131 | handlers = console | |
|
132 | qualname = sqlalchemy.engine | |
|
133 | propagate = 0 | |
|
134 | ||
|
135 | ############## | |
|
136 | ## HANDLERS ## | |
|
137 | ############## | |
|
138 | ||
|
53 | 139 | [handler_console] |
|
54 | 140 | class = StreamHandler |
|
55 | 141 | args = (sys.stderr,) |
|
56 | 142 | level = NOTSET |
|
57 |
formatter = |
|
|
143 | formatter = color_formatter | |
|
144 | ||
|
145 | ################ | |
|
146 | ## FORMATTERS ## | |
|
147 | ################ | |
|
58 | 148 | |
|
59 | 149 | [formatter_generic] |
|
60 | format = %(asctime)s %(levelname)-5.5s [%(name)s] %(message)s | |
|
150 | format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s | |
|
151 | datefmt = %Y-%m-%d %H:%M:%S | |
|
152 | ||
|
153 | [formatter_color_formatter] | |
|
154 | class=pylons_app.lib.colored_formatter.ColorFormatter | |
|
155 | format= %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s | |
|
156 | datefmt = %Y-%m-%d %H:%M:%S No newline at end of file |
General Comments 0
You need to be logged in to leave comments.
Login now