Mercurial > kallithea
annotate production.ini @ 179:63f9dc67ab0a
fixed ini files. Added coment and colored formatter to production
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Fri, 21 May 2010 23:13:09 +0200 |
parents | a5a3bcc5ee89 |
children | 188e3db6977a |
rev | line source |
---|---|
12 | 1 ################################################################################ |
2 ################################################################################ | |
3 # pylons_app - Pylons environment configuration # | |
4 # # | |
5 # The %(here)s variable will be replaced with the parent directory of this file# | |
6 ################################################################################ | |
10
525ed90e4577
major app speedup moved the wsgi creation to app globals, in order to make it run only once.
Marcin Kuzminski
parents:
7
diff
changeset
|
7 |
2 | 8 [DEFAULT] |
9 debug = true | |
12 | 10 ############################################ |
11 ## Uncomment and replace with the address ## | |
12 ## which should receive any error reports ## | |
13 ############################################ | |
14 | 14 #email_to = marcin.kuzminski@etelko.pl |
15 #smtp_server = mail.etelko.pl | |
16 #error_email_from = paste_error@localhost | |
17 #smtp_username = | |
18 #smtp_password = | |
19 #error_message = 'mercurial crash !' | |
2 | 20 |
21 [server:main] | |
86
e47d1db5ef20
Added few options to configs,
Marcin Kuzminski <marcin@python-blog.com>
parents:
85
diff
changeset
|
22 ##nr of threads to spawn |
e47d1db5ef20
Added few options to configs,
Marcin Kuzminski <marcin@python-blog.com>
parents:
85
diff
changeset
|
23 threadpool_workers = 5 |
e47d1db5ef20
Added few options to configs,
Marcin Kuzminski <marcin@python-blog.com>
parents:
85
diff
changeset
|
24 |
e47d1db5ef20
Added few options to configs,
Marcin Kuzminski <marcin@python-blog.com>
parents:
85
diff
changeset
|
25 ##max request before |
e47d1db5ef20
Added few options to configs,
Marcin Kuzminski <marcin@python-blog.com>
parents:
85
diff
changeset
|
26 threadpool_max_requests = 2 |
e47d1db5ef20
Added few options to configs,
Marcin Kuzminski <marcin@python-blog.com>
parents:
85
diff
changeset
|
27 |
e47d1db5ef20
Added few options to configs,
Marcin Kuzminski <marcin@python-blog.com>
parents:
85
diff
changeset
|
28 ##option to use threads of process |
e47d1db5ef20
Added few options to configs,
Marcin Kuzminski <marcin@python-blog.com>
parents:
85
diff
changeset
|
29 use_threadpool = true |
e47d1db5ef20
Added few options to configs,
Marcin Kuzminski <marcin@python-blog.com>
parents:
85
diff
changeset
|
30 |
2 | 31 use = egg:Paste#http |
32 host = 127.0.0.1 | |
7 | 33 port = 8001 |
2 | 34 |
35 [app:main] | |
36 use = egg:pylons_app | |
14 | 37 full_stack = true |
46
9db7782727b3
Static files for production fixed
Marcin Kuzminski <marcin@python-blog.com>
parents:
41
diff
changeset
|
38 static_files = true |
2 | 39 lang=en |
40 cache_dir = %(here)s/data | |
60
eb0268a89187
Changed db name, and project prefix
Marcin Kuzminski <marcin@python-blog.com>
parents:
56
diff
changeset
|
41 repos_name = Python-works |
2 | 42 |
49
3ada2f409c1c
Added sqlalchemy support
Marcin Kuzminski <marcin@python-blog.com>
parents:
46
diff
changeset
|
43 #################################### |
3ada2f409c1c
Added sqlalchemy support
Marcin Kuzminski <marcin@python-blog.com>
parents:
46
diff
changeset
|
44 ### BEAKER CACHE #### |
3ada2f409c1c
Added sqlalchemy support
Marcin Kuzminski <marcin@python-blog.com>
parents:
46
diff
changeset
|
45 #################################### |
3ada2f409c1c
Added sqlalchemy support
Marcin Kuzminski <marcin@python-blog.com>
parents:
46
diff
changeset
|
46 beaker.cache.data_dir=/tmp/cache/data |
3ada2f409c1c
Added sqlalchemy support
Marcin Kuzminski <marcin@python-blog.com>
parents:
46
diff
changeset
|
47 beaker.cache.lock_dir=/tmp/cache/lock |
107
5e2470ebdbc6
Added repo switcher, in base and long term caching for this.
Marcin Kuzminski <marcin@python-works.com>
parents:
86
diff
changeset
|
48 beaker.cache.regions=short_term,long_term |
5e2470ebdbc6
Added repo switcher, in base and long term caching for this.
Marcin Kuzminski <marcin@python-works.com>
parents:
86
diff
changeset
|
49 beaker.cache.short_term.type=file |
5e2470ebdbc6
Added repo switcher, in base and long term caching for this.
Marcin Kuzminski <marcin@python-works.com>
parents:
86
diff
changeset
|
50 beaker.cache.short_term.expire=3600 |
49
3ada2f409c1c
Added sqlalchemy support
Marcin Kuzminski <marcin@python-blog.com>
parents:
46
diff
changeset
|
51 beaker.cache.short_term.type=memory |
107
5e2470ebdbc6
Added repo switcher, in base and long term caching for this.
Marcin Kuzminski <marcin@python-works.com>
parents:
86
diff
changeset
|
52 beaker.cache.short_term.expire=60 |
49
3ada2f409c1c
Added sqlalchemy support
Marcin Kuzminski <marcin@python-blog.com>
parents:
46
diff
changeset
|
53 |
12 | 54 ################################################################################ |
55 ## WARNING: *THE LINE BELOW MUST BE UNCOMMENTED ON A PRODUCTION ENVIRONMENT* ## | |
56 ## Debug mode will enable the interactive debugging tool, allowing ANYONE to ## | |
57 ## execute malicious code after an exception is raised. ## | |
58 ################################################################################ | |
85
4bb06ccb5bee
Debug off. for production
Marcin Kuzminski <marcin@python-blog.com>
parents:
83
diff
changeset
|
59 set debug = false |
2 | 60 |
49
3ada2f409c1c
Added sqlalchemy support
Marcin Kuzminski <marcin@python-blog.com>
parents:
46
diff
changeset
|
61 ################################## |
3ada2f409c1c
Added sqlalchemy support
Marcin Kuzminski <marcin@python-blog.com>
parents:
46
diff
changeset
|
62 ### LOGVIEW CONFIG ### |
3ada2f409c1c
Added sqlalchemy support
Marcin Kuzminski <marcin@python-blog.com>
parents:
46
diff
changeset
|
63 ################################## |
3ada2f409c1c
Added sqlalchemy support
Marcin Kuzminski <marcin@python-blog.com>
parents:
46
diff
changeset
|
64 logview.sqlalchemy = #faa |
3ada2f409c1c
Added sqlalchemy support
Marcin Kuzminski <marcin@python-blog.com>
parents:
46
diff
changeset
|
65 logview.pylons.templating = #bfb |
3ada2f409c1c
Added sqlalchemy support
Marcin Kuzminski <marcin@python-blog.com>
parents:
46
diff
changeset
|
66 logview.pylons.util = #eee |
3ada2f409c1c
Added sqlalchemy support
Marcin Kuzminski <marcin@python-blog.com>
parents:
46
diff
changeset
|
67 |
3ada2f409c1c
Added sqlalchemy support
Marcin Kuzminski <marcin@python-blog.com>
parents:
46
diff
changeset
|
68 ######################################################### |
3ada2f409c1c
Added sqlalchemy support
Marcin Kuzminski <marcin@python-blog.com>
parents:
46
diff
changeset
|
69 ### DB CONFIGS - EACH DB WILL HAVE IT'S OWN CONFIG ### |
3ada2f409c1c
Added sqlalchemy support
Marcin Kuzminski <marcin@python-blog.com>
parents:
46
diff
changeset
|
70 ######################################################### |
60
eb0268a89187
Changed db name, and project prefix
Marcin Kuzminski <marcin@python-blog.com>
parents:
56
diff
changeset
|
71 sqlalchemy.db1.url = sqlite:///%(here)s/hg_app.db |
49
3ada2f409c1c
Added sqlalchemy support
Marcin Kuzminski <marcin@python-blog.com>
parents:
46
diff
changeset
|
72 #sqlalchemy.db1.echo = True |
3ada2f409c1c
Added sqlalchemy support
Marcin Kuzminski <marcin@python-blog.com>
parents:
46
diff
changeset
|
73 #sqlalchemy.db1.pool_recycle = 3600 |
3ada2f409c1c
Added sqlalchemy support
Marcin Kuzminski <marcin@python-blog.com>
parents:
46
diff
changeset
|
74 sqlalchemy.convert_unicode = true |
3ada2f409c1c
Added sqlalchemy support
Marcin Kuzminski <marcin@python-blog.com>
parents:
46
diff
changeset
|
75 |
12 | 76 ################################ |
77 ### LOGGING CONFIGURATION #### | |
78 ################################ | |
2 | 79 [loggers] |
12 | 80 keys = root, routes, pylons_app, sqlalchemy |
2 | 81 |
82 [handlers] | |
12 | 83 keys = console |
2 | 84 |
85 [formatters] | |
179
63f9dc67ab0a
fixed ini files. Added coment and colored formatter to production
Marcin Kuzminski <marcin@python-works.com>
parents:
153
diff
changeset
|
86 keys = generic,color_formatter |
2 | 87 |
12 | 88 ############# |
2 | 89 ## LOGGERS ## |
12 | 90 ############# |
2 | 91 [logger_root] |
12 | 92 level = INFO |
93 handlers = console | |
2 | 94 |
95 [logger_routes] | |
96 level = INFO | |
12 | 97 handlers = console |
2 | 98 qualname = routes.middleware |
99 # "level = DEBUG" logs the route matched and routing variables. | |
100 | |
101 [logger_pylons_app] | |
102 level = DEBUG | |
12 | 103 handlers = console |
2 | 104 qualname = pylons_app |
153
a5a3bcc5ee89
Added colored formatter to project, and configs
Marcin Kuzminski <marcin@python-works.com>
parents:
107
diff
changeset
|
105 propagate = 0 |
2 | 106 |
12 | 107 [logger_sqlalchemy] |
153
a5a3bcc5ee89
Added colored formatter to project, and configs
Marcin Kuzminski <marcin@python-works.com>
parents:
107
diff
changeset
|
108 level = ERROR |
12 | 109 handlers = console |
110 qualname = sqlalchemy.engine | |
153
a5a3bcc5ee89
Added colored formatter to project, and configs
Marcin Kuzminski <marcin@python-works.com>
parents:
107
diff
changeset
|
111 propagate = 0 |
12 | 112 |
113 ############## | |
2 | 114 ## HANDLERS ## |
12 | 115 ############## |
2 | 116 |
117 [handler_console] | |
118 class = StreamHandler | |
119 args = (sys.stderr,) | |
120 level = NOTSET | |
179
63f9dc67ab0a
fixed ini files. Added coment and colored formatter to production
Marcin Kuzminski <marcin@python-works.com>
parents:
153
diff
changeset
|
121 formatter = color_formatter |
2 | 122 |
12 | 123 ################ |
2 | 124 ## FORMATTERS ## |
12 | 125 ################ |
2 | 126 |
127 [formatter_generic] | |
153
a5a3bcc5ee89
Added colored formatter to project, and configs
Marcin Kuzminski <marcin@python-works.com>
parents:
107
diff
changeset
|
128 format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s |
46
9db7782727b3
Static files for production fixed
Marcin Kuzminski <marcin@python-blog.com>
parents:
41
diff
changeset
|
129 datefmt = %Y-%m-%d %H:%M:%S |
2 | 130 |
153
a5a3bcc5ee89
Added colored formatter to project, and configs
Marcin Kuzminski <marcin@python-works.com>
parents:
107
diff
changeset
|
131 [formatter_color_formatter] |
a5a3bcc5ee89
Added colored formatter to project, and configs
Marcin Kuzminski <marcin@python-works.com>
parents:
107
diff
changeset
|
132 class=pylons_app.lib.colored_formatter.ColorFormatter |
a5a3bcc5ee89
Added colored formatter to project, and configs
Marcin Kuzminski <marcin@python-works.com>
parents:
107
diff
changeset
|
133 format= %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s |
a5a3bcc5ee89
Added colored formatter to project, and configs
Marcin Kuzminski <marcin@python-works.com>
parents:
107
diff
changeset
|
134 datefmt = %Y-%m-%d %H:%M:%S |