##// END OF EJS Templates
ini: add scripts/generate-ini.py for generating all .ini files from template.ini.mako...
Mads Kiilerich -
r5536:06d5c043 default
parent child Browse files
Show More
@@ -0,0 +1,173 b''
1 #!/usr/bin/env python2
2 """
3 Based on kallithea/bin/template.ini.mako, generate
4 kallithea/config/deployment.ini_tmpl
5 development.ini
6 kallithea/tests/test.ini
7 """
8
9 import re
10
11 makofile = 'kallithea/bin/template.ini.mako'
12
13 # the mako conditionals used in all other ini files and templates
14 selected_mako_conditionals = set([
15 "database_engine == 'sqlite'",
16 "http_server == 'waitress'",
17 "error_aggregation_service == 'errormator'",
18 "error_aggregation_service == 'sentry'",
19 ])
20
21 # the mako variables used in all other ini files and templates
22 mako_variable_values = {
23 'host': '127.0.0.1',
24 'port': '5000',
25 'here': '%(here)s',
26 'uuid()': '${app_instance_uuid}',
27 }
28
29 # files to be generated from the mako template
30 ini_files = [
31 ('kallithea/config/deployment.ini_tmpl',
32 '''
33 Kallithea - Example config
34
35 The %(here)s variable will be replaced with the parent directory of this file
36 ''',
37 {}, # exactly the same settings as template.ini.mako
38 ),
39 ('kallithea/tests/test.ini',
40 '''
41 Kallithea - config for tests:
42 initial_repo_scan = true
43 vcs_full_cache = false
44 sqlalchemy and kallithea_test.sqlite
45 custom logging
46
47 The %(here)s variable will be replaced with the parent directory of this file
48 ''',
49 {
50 '[server:main]': {
51 'port': '4999',
52 },
53 '[app:main]': {
54 'initial_repo_scan': 'true',
55 'app_instance_uuid': 'test',
56 'vcs_full_cache': 'false',
57 'show_revision_number': 'true',
58 'beaker.cache.sql_cache_short.expire': '1',
59 'beaker.session.secret': '{74e0cd75-b339-478b-b129-07dd221def1f}',
60 'sqlalchemy.db1.url': 'sqlite:///%(here)s/kallithea_test.sqlite',
61 },
62 '[logger_root]': {
63 'level': 'DEBUG',
64 },
65 '[logger_sqlalchemy]': {
66 'level': 'ERROR',
67 'handlers': 'console',
68 },
69 '[handler_console]': {
70 'level': 'NOTSET',
71 },
72 },
73 ),
74 ('development.ini',
75 '''
76 Kallithea - Development config:
77 listening on *:5000
78 sqlite and kallithea.db
79 initial_repo_scan = true
80 set debug = true
81 verbose and colorful logging
82
83 The %(here)s variable will be replaced with the parent directory of this file
84 ''',
85 {
86 '[server:main]': {
87 'host': '0.0.0.0',
88 },
89 '[app:main]': {
90 'initial_repo_scan': 'true',
91 'set debug': 'true',
92 'app_instance_uuid': 'development-not-secret',
93 'beaker.session.secret': 'development-not-secret',
94 },
95 '[handler_console]': {
96 'level': 'DEBUG',
97 'formatter': 'color_formatter',
98 },
99 '[handler_console_sql]': {
100 'level': 'DEBUG',
101 'formatter': 'color_formatter_sql',
102 },
103 },
104 ),
105 ]
106
107
108 def main():
109 # make sure all mako lines starting with '#' (the '##' comments) are marked up as <text>
110 print 'reading:', makofile
111 mako_org = file(makofile).read()
112 mako_no_text_markup = re.sub(r'</?%text>', '', mako_org)
113 mako_marked_up = re.sub(r'\n(##.*)', r'\n<%text>\1</%text>', mako_no_text_markup, flags=re.MULTILINE)
114 if mako_marked_up != mako_org:
115 print 'writing:', makofile
116 file(makofile, 'w').write(mako_marked_up)
117
118 # select the right mako conditionals for the other less sophisticated formats
119 def sub_conditionals(m):
120 """given a %if...%endif match, replace with just the selected
121 conditional sections enabled and the rest as comments
122 """
123 conditional_lines = m.group(1)
124 def sub_conditional(m):
125 """given a conditional and the corresponding lines, return them raw
126 or commented out, based on whether conditional is selected
127 """
128 criteria, lines = m.groups()
129 if criteria not in selected_mako_conditionals:
130 lines = '\n'.join((l if not l or l.startswith('#') else '#' + l) for l in lines.split('\n'))
131 return lines
132 conditional_lines = re.sub(r'^%(?:el)?if (.*):\n((?:^[^%\n].*\n|\n)*)',
133 sub_conditional, conditional_lines, flags=re.MULTILINE)
134 return conditional_lines
135 mako_no_conditionals = re.sub(r'^(%if .*\n(?:[^%\n].*\n|%elif .*\n|\n)*)%endif\n',
136 sub_conditionals, mako_no_text_markup, flags=re.MULTILINE)
137
138 # expand mako variables
139 def pyrepl(m):
140 return mako_variable_values.get(m.group(1), m.group(0))
141 mako_no_variables = re.sub(r'\${([^}]*)}', pyrepl, mako_no_conditionals)
142
143 # remove utf-8 coding header
144 base_ini = re.sub(r'^## -\*- coding: utf-8 -\*-\n', '', mako_no_variables)
145
146 # create ini files
147 for fn, desc, settings in ini_files:
148 print 'updating:', fn
149 ini_lines = re.sub(
150 '# Kallithea - config file generated with kallithea-config *#\n',
151 ''.join('# %-77s#\n' % l.strip() for l in desc.strip().split('\n')),
152 base_ini)
153 def process_section(m):
154 """process a ini section, replacing values as necessary"""
155 sectionname, lines = m.groups()
156 if sectionname in settings:
157 section_settings = settings[sectionname]
158 def process_line(m):
159 """process a section line and update value if necessary"""
160 setting, value = m.groups()
161 line = m.group(0)
162 if setting in section_settings:
163 line = '%s = %s' % (setting, section_settings[setting])
164 if '$' not in value:
165 line = '#%s = %s\n%s' % (setting, value, line)
166 return line.rstrip()
167 lines = re.sub(r'^([^#\n].*) = ?(.*)', process_line, lines, flags=re.MULTILINE)
168 return sectionname + '\n' + lines
169 ini_lines = re.sub(r'^(\[.*\])\n((?:(?:[^[\n].*)?\n)*)', process_section, ini_lines, flags=re.MULTILINE)
170 file(fn, 'w').write(ini_lines)
171
172 if __name__ == '__main__':
173 main()
@@ -1,585 +1,586 b''
1 1 ################################################################################
2 2 ################################################################################
3 3 # Kallithea - Development config: #
4 4 # listening on *:5000 #
5 5 # sqlite and kallithea.db #
6 6 # initial_repo_scan = true #
7 7 # set debug = true #
8 8 # verbose and colorful logging #
9 9 # #
10 10 # The %(here)s variable will be replaced with the parent directory of this file#
11 11 ################################################################################
12 12 ################################################################################
13 13
14 14 [DEFAULT]
15 15 debug = true
16 16 pdebug = false
17 17
18 18 ################################################################################
19 19 ## Email settings ##
20 20 ## ##
21 21 ## Refer to the documentation ("Email settings") for more details. ##
22 22 ## ##
23 23 ## It is recommended to use a valid sender address that passes access ##
24 24 ## validation and spam filtering in mail servers. ##
25 25 ################################################################################
26 26
27 27 ## 'From' header for application emails. You can optionally add a name.
28 28 ## Default:
29 29 #app_email_from = Kallithea
30 30 ## Examples:
31 31 #app_email_from = Kallithea <kallithea-noreply@example.com>
32 32 #app_email_from = kallithea-noreply@example.com
33 33
34 34 ## Subject prefix for application emails.
35 35 ## A space between this prefix and the real subject is automatically added.
36 36 ## Default:
37 37 #email_prefix =
38 38 ## Example:
39 39 #email_prefix = [Kallithea]
40 40
41 41 ## Recipients for error emails and fallback recipients of application mails.
42 42 ## Multiple addresses can be specified, space-separated.
43 43 ## Only addresses are allowed, do not add any name part.
44 44 ## Default:
45 45 #email_to =
46 46 ## Examples:
47 47 #email_to = admin@example.com
48 48 #email_to = admin@example.com another_admin@example.com
49 49
50 50 ## 'From' header for error emails. You can optionally add a name.
51 51 ## Default:
52 52 #error_email_from = pylons@yourapp.com
53 53 ## Examples:
54 54 #error_email_from = Kallithea Errors <kallithea-noreply@example.com>
55 55 #error_email_from = paste_error@example.com
56 56
57 57 ## SMTP server settings
58 58 ## Only smtp_server is mandatory. All other settings take the specified default
59 59 ## values.
60 60 #smtp_server = smtp.example.com
61 61 #smtp_username =
62 62 #smtp_password =
63 63 #smtp_port = 25
64 64 #smtp_use_tls = false
65 65 #smtp_use_ssl = false
66 66 ## SMTP authentication parameters to use (e.g. LOGIN PLAIN CRAM-MD5, etc.).
67 67 ## If empty, use any of the authentication parameters supported by the server.
68 68 #smtp_auth =
69 69
70 70 [server:main]
71 71 ## PASTE ##
72 72 #use = egg:Paste#http
73 73 ## nr of worker threads to spawn
74 74 #threadpool_workers = 5
75 75 ## max request before thread respawn
76 76 #threadpool_max_requests = 10
77 77 ## option to use threads of process
78 78 #use_threadpool = true
79 79
80 80 ## WAITRESS ##
81 81 use = egg:waitress#main
82 82 ## number of worker threads
83 83 threads = 5
84 84 ## MAX BODY SIZE 100GB
85 85 max_request_body_size = 107374182400
86 86 ## use poll instead of select, fixes fd limits, may not work on old
87 87 ## windows systems.
88 88 #asyncore_use_poll = True
89 89
90 90 ## GUNICORN ##
91 91 #use = egg:gunicorn#main
92 92 ## number of process workers. You must set `instance_id = *` when this option
93 93 ## is set to more than one worker
94 94 #workers = 1
95 95 ## process name
96 96 #proc_name = kallithea
97 97 ## type of worker class, one of sync, eventlet, gevent, tornado
98 98 ## recommended for bigger setup is using of of other than sync one
99 99 #worker_class = sync
100 100 #max_requests = 1000
101 101 ## ammount of time a worker can handle request before it gets killed and
102 102 ## restarted
103 103 #timeout = 3600
104 104
105 105 ## UWSGI ##
106 106 ## run with uwsgi --ini-paste-logged <inifile.ini>
107 107 #[uwsgi]
108 108 #socket = /tmp/uwsgi.sock
109 109 #master = true
110 110 #http = 127.0.0.1:5000
111 111
112 112 ## set as deamon and redirect all output to file
113 113 #daemonize = ./uwsgi_kallithea.log
114 114
115 115 ## master process PID
116 116 #pidfile = ./uwsgi_kallithea.pid
117 117
118 118 ## stats server with workers statistics, use uwsgitop
119 119 ## for monitoring, `uwsgitop 127.0.0.1:1717`
120 120 #stats = 127.0.0.1:1717
121 121 #memory-report = true
122 122
123 123 ## log 5XX errors
124 124 #log-5xx = true
125 125
126 126 ## Set the socket listen queue size.
127 127 #listen = 256
128 128
129 129 ## Gracefully Reload workers after the specified amount of managed requests
130 130 ## (avoid memory leaks).
131 131 #max-requests = 1000
132 132
133 133 ## enable large buffers
134 134 #buffer-size = 65535
135 135
136 136 ## socket and http timeouts ##
137 137 #http-timeout = 3600
138 138 #socket-timeout = 3600
139 139
140 140 ## Log requests slower than the specified number of milliseconds.
141 141 #log-slow = 10
142 142
143 143 ## Exit if no app can be loaded.
144 144 #need-app = true
145 145
146 146 ## Set lazy mode (load apps in workers instead of master).
147 147 #lazy = true
148 148
149 149 ## scaling ##
150 150 ## set cheaper algorithm to use, if not set default will be used
151 151 #cheaper-algo = spare
152 152
153 153 ## minimum number of workers to keep at all times
154 154 #cheaper = 1
155 155
156 156 ## number of workers to spawn at startup
157 157 #cheaper-initial = 1
158 158
159 159 ## maximum number of workers that can be spawned
160 160 #workers = 4
161 161
162 162 ## how many workers should be spawned at a time
163 163 #cheaper-step = 1
164 164
165 165 ## COMMON ##
166 #host = 127.0.0.1
166 167 host = 0.0.0.0
167 168 port = 5000
168 169
169 170 ## middleware for hosting the WSGI application under a URL prefix
170 171 #[filter:proxy-prefix]
171 172 #use = egg:PasteDeploy#prefix
172 173 #prefix = /<your-prefix>
173 174
174 175 [app:main]
175 176 use = egg:kallithea
176 177 ## enable proxy prefix middleware
177 178 #filter-with = proxy-prefix
178 179
179 180 full_stack = true
180 181 static_files = true
181 182 ## Available Languages:
182 183 ## cs de fr hu ja nl_BE pl pt_BR ru sk zh_CN zh_TW
183 184 lang =
184 185 cache_dir = %(here)s/data
185 186 index_dir = %(here)s/data/index
186 187
187 188 ## perform a full repository scan on each server start, this should be
188 189 ## set to false after first startup, to allow faster server restarts.
189 190 #initial_repo_scan = false
190 191 initial_repo_scan = true
191 192
192 193 ## uncomment and set this path to use archive download cache
193 194 archive_cache_dir = %(here)s/tarballcache
194 195
195 196 ## change this to unique ID for security
196 197 app_instance_uuid = development-not-secret
197 198
198 199 ## cut off limit for large diffs (size in bytes)
199 200 cut_off_limit = 256000
200 201
201 202 ## use cache version of scm repo everywhere
202 203 vcs_full_cache = true
203 204
204 205 ## force https in Kallithea, fixes https redirects, assumes it's always https
205 206 force_https = false
206 207
207 208 ## use Strict-Transport-Security headers
208 209 use_htsts = false
209 210
210 211 ## number of commits stats will parse on each iteration
211 212 commit_parse_limit = 25
212 213
213 214 ## path to git executable
214 215 git_path = git
215 216
216 217 ## git rev filter option, --all is the default filter, if you need to
217 218 ## hide all refs in changelog switch this to --branches --tags
218 219 #git_rev_filter = --branches --tags
219 220
220 221 ## RSS feed options
221 222 rss_cut_off_limit = 256000
222 223 rss_items_per_page = 10
223 224 rss_include_diff = false
224 225
225 226 ## options for showing and identifying changesets
226 227 show_sha_length = 12
227 228 show_revision_number = false
228 229
229 230 ## gist URL alias, used to create nicer urls for gist. This should be an
230 231 ## url that does rewrites to _admin/gists/<gistid>.
231 232 ## example: http://gist.example.com/{gistid}. Empty means use the internal
232 233 ## Kallithea url, ie. http[s]://kallithea.example.com/_admin/gists/<gistid>
233 234 gist_alias_url =
234 235
235 236 ## white list of API enabled controllers. This allows to add list of
236 237 ## controllers to which access will be enabled by api_key. eg: to enable
237 238 ## api access to raw_files put `FilesController:raw`, to enable access to patches
238 239 ## add `ChangesetController:changeset_patch`. This list should be "," separated
239 240 ## Syntax is <ControllerClass>:<function>. Check debug logs for generated names
240 241 ## Recommended settings below are commented out:
241 242 api_access_controllers_whitelist =
242 243 # ChangesetController:changeset_patch,
243 244 # ChangesetController:changeset_raw,
244 245 # FilesController:raw,
245 246 # FilesController:archivefile
246 247
247 248 ## default encoding used to convert from and to unicode
248 249 ## can be also a comma seperated list of encoding in case of mixed encodings
249 250 default_encoding = utf8
250 251
251 252 ## issue tracker for Kallithea (leave blank to disable, absent for default)
252 253 #bugtracker = https://bitbucket.org/conservancy/kallithea/issues
253 254
254 255 ## issue tracking mapping for commits messages
255 256 ## comment out issue_pat, issue_server, issue_prefix to enable
256 257
257 258 ## pattern to get the issues from commit messages
258 259 ## default one used here is #<numbers> with a regex passive group for `#`
259 260 ## {id} will be all groups matched from this pattern
260 261
261 262 issue_pat = (?:\s*#)(\d+)
262 263
263 264 ## server url to the issue, each {id} will be replaced with match
264 265 ## fetched from the regex and {repo} is replaced with full repository name
265 266 ## including groups {repo_name} is replaced with just name of repo
266 267
267 268 issue_server_link = https://issues.example.com/{repo}/issue/{id}
268 269
269 270 ## prefix to add to link to indicate it's an url
270 271 ## #314 will be replaced by <issue_prefix><id>
271 272
272 273 issue_prefix = #
273 274
274 275 ## issue_pat, issue_server_link, issue_prefix can have suffixes to specify
275 276 ## multiple patterns, to other issues server, wiki or others
276 277 ## below an example how to create a wiki pattern
277 278 # wiki-some-id -> https://wiki.example.com/some-id
278 279
279 280 #issue_pat_wiki = (?:wiki-)(.+)
280 281 #issue_server_link_wiki = https://wiki.example.com/{id}
281 282 #issue_prefix_wiki = WIKI-
282 283
283 284 ## alternative return HTTP header for failed authentication. Default HTTP
284 285 ## response is 401 HTTPUnauthorized. Currently Mercurial clients have trouble with
285 286 ## handling that. Set this variable to 403 to return HTTPForbidden
286 287 auth_ret_code =
287 288
288 289 ## locking return code. When repository is locked return this HTTP code. 2XX
289 290 ## codes don't break the transactions while 4XX codes do
290 291 lock_ret_code = 423
291 292
292 293 ## allows to change the repository location in settings page
293 294 allow_repo_location_change = True
294 295
295 296 ## allows to setup custom hooks in settings page
296 297 allow_custom_hooks_settings = True
297 298
298 299 ####################################
299 300 ### CELERY CONFIG ####
300 301 ####################################
301 302
302 303 use_celery = false
303 304 broker.host = localhost
304 305 broker.vhost = rabbitmqhost
305 306 broker.port = 5672
306 307 broker.user = rabbitmq
307 308 broker.password = qweqwe
308 309
309 310 celery.imports = kallithea.lib.celerylib.tasks
310 311
311 312 celery.result.backend = amqp
312 313 celery.result.dburi = amqp://
313 314 celery.result.serialier = json
314 315
315 316 #celery.send.task.error.emails = true
316 317 #celery.amqp.task.result.expires = 18000
317 318
318 319 celeryd.concurrency = 2
319 320 #celeryd.log.file = celeryd.log
320 321 celeryd.log.level = DEBUG
321 322 celeryd.max.tasks.per.child = 1
322 323
323 324 ## tasks will never be sent to the queue, but executed locally instead.
324 325 celery.always.eager = false
325 326
326 327 ####################################
327 328 ### BEAKER CACHE ####
328 329 ####################################
329 330
330 331 beaker.cache.data_dir = %(here)s/data/cache/data
331 332 beaker.cache.lock_dir = %(here)s/data/cache/lock
332 333
333 334 beaker.cache.regions = short_term,long_term,sql_cache_short
334 335
335 336 beaker.cache.short_term.type = memory
336 337 beaker.cache.short_term.expire = 60
337 338 beaker.cache.short_term.key_length = 256
338 339
339 340 beaker.cache.long_term.type = memory
340 341 beaker.cache.long_term.expire = 36000
341 342 beaker.cache.long_term.key_length = 256
342 343
343 344 beaker.cache.sql_cache_short.type = memory
344 345 beaker.cache.sql_cache_short.expire = 10
345 346 beaker.cache.sql_cache_short.key_length = 256
346 347
347 348 ####################################
348 349 ### BEAKER SESSION ####
349 350 ####################################
350 351
351 352 ## Name of session cookie. Should be unique for a given host and path, even when running
352 353 ## on different ports. Otherwise, cookie sessions will be shared and messed up.
353 354 beaker.session.key = kallithea
354 355 ## Sessions should always only be accessible by the browser, not directly by JavaScript.
355 356 beaker.session.httponly = true
356 357 ## Session lifetime. 2592000 seconds is 30 days.
357 358 beaker.session.timeout = 2592000
358 359
359 360 ## Server secret used with HMAC to ensure integrity of cookies.
360 361 beaker.session.secret = development-not-secret
361 362 ## Further, encrypt the data with AES.
362 363 #beaker.session.encrypt_key = <key_for_encryption>
363 364 #beaker.session.validate_key = <validation_key>
364 365
365 366 ## Type of storage used for the session, current types are
366 367 ## dbm, file, memcached, database, and memory.
367 368
368 369 ## File system storage of session data. (default)
369 370 #beaker.session.type = file
370 371
371 372 ## Cookie only, store all session data inside the cookie. Requires secure secrets.
372 373 #beaker.session.type = cookie
373 374
374 375 ## Database storage of session data.
375 376 #beaker.session.type = ext:database
376 377 #beaker.session.sa.url = postgresql://postgres:qwe@localhost/kallithea
377 378 #beaker.session.table_name = db_session
378 379
379 380 ############################
380 381 ## ERROR HANDLING SYSTEMS ##
381 382 ############################
382 383
383 384 ####################
384 385 ### [errormator] ###
385 386 ####################
386 387
387 388 ## Errormator is tailored to work with Kallithea, see
388 389 ## http://errormator.com for details how to obtain an account
389 390 ## you must install python package `errormator_client` to make it work
390 391
391 392 ## errormator enabled
392 393 errormator = false
393 394
394 395 errormator.server_url = https://api.errormator.com
395 396 errormator.api_key = YOUR_API_KEY
396 397
397 398 ## TWEAK AMOUNT OF INFO SENT HERE
398 399
399 400 ## enables 404 error logging (default False)
400 401 errormator.report_404 = false
401 402
402 403 ## time in seconds after request is considered being slow (default 1)
403 404 errormator.slow_request_time = 1
404 405
405 406 ## record slow requests in application
406 407 ## (needs to be enabled for slow datastore recording and time tracking)
407 408 errormator.slow_requests = true
408 409
409 410 ## enable hooking to application loggers
410 411 #errormator.logging = true
411 412
412 413 ## minimum log level for log capture
413 414 #errormator.logging.level = WARNING
414 415
415 416 ## send logs only from erroneous/slow requests
416 417 ## (saves API quota for intensive logging)
417 418 errormator.logging_on_error = false
418 419
419 420 ## list of additonal keywords that should be grabbed from environ object
420 421 ## can be string with comma separated list of words in lowercase
421 422 ## (by default client will always send following info:
422 423 ## 'REMOTE_USER', 'REMOTE_ADDR', 'SERVER_NAME', 'CONTENT_TYPE' + all keys that
423 424 ## start with HTTP* this list be extended with additional keywords here
424 425 errormator.environ_keys_whitelist =
425 426
426 427 ## list of keywords that should be blanked from request object
427 428 ## can be string with comma separated list of words in lowercase
428 429 ## (by default client will always blank keys that contain following words
429 430 ## 'password', 'passwd', 'pwd', 'auth_tkt', 'secret', 'csrf'
430 431 ## this list be extended with additional keywords set here
431 432 errormator.request_keys_blacklist =
432 433
433 434 ## list of namespaces that should be ignores when gathering log entries
434 435 ## can be string with comma separated list of namespaces
435 436 ## (by default the client ignores own entries: errormator_client.client)
436 437 errormator.log_namespace_blacklist =
437 438
438 439 ################
439 440 ### [sentry] ###
440 441 ################
441 442
442 443 ## sentry is a alternative open source error aggregator
443 444 ## you must install python packages `sentry` and `raven` to enable
444 445
445 446 sentry.dsn = YOUR_DNS
446 447 sentry.servers =
447 448 sentry.name =
448 449 sentry.key =
449 450 sentry.public_key =
450 451 sentry.secret_key =
451 452 sentry.project =
452 453 sentry.site =
453 454 sentry.include_paths =
454 455 sentry.exclude_paths =
455 456
456 457 ################################################################################
457 458 ## WARNING: *THE LINE BELOW MUST BE UNCOMMENTED ON A PRODUCTION ENVIRONMENT* ##
458 459 ## Debug mode will enable the interactive debugging tool, allowing ANYONE to ##
459 460 ## execute malicious code after an exception is raised. ##
460 461 ################################################################################
461 462 #set debug = false
462 463 set debug = true
463 464
464 465 ##################################
465 466 ### LOGVIEW CONFIG ###
466 467 ##################################
467 468
468 469 logview.sqlalchemy = #faa
469 470 logview.pylons.templating = #bfb
470 471 logview.pylons.util = #eee
471 472
472 473 #########################################################
473 474 ### DB CONFIGS - EACH DB WILL HAVE IT'S OWN CONFIG ###
474 475 #########################################################
475 476
476 477 # SQLITE [default]
477 478 sqlalchemy.db1.url = sqlite:///%(here)s/kallithea.db?timeout=60
478 479
479 480 # POSTGRESQL
480 481 #sqlalchemy.db1.url = postgresql://user:pass@localhost/kallithea
481 482
482 483 # MySQL
483 484 #sqlalchemy.db1.url = mysql://user:pass@localhost/kallithea
484 485
485 486 # see sqlalchemy docs for others
486 487
487 488 sqlalchemy.db1.echo = false
488 489 sqlalchemy.db1.pool_recycle = 3600
489 490 sqlalchemy.db1.convert_unicode = true
490 491
491 492 ################################
492 493 ### LOGGING CONFIGURATION ####
493 494 ################################
494 495
495 496 [loggers]
496 497 keys = root, routes, kallithea, sqlalchemy, beaker, templates, whoosh_indexer
497 498
498 499 [handlers]
499 500 keys = console, console_sql
500 501
501 502 [formatters]
502 503 keys = generic, color_formatter, color_formatter_sql
503 504
504 505 #############
505 506 ## LOGGERS ##
506 507 #############
507 508
508 509 [logger_root]
509 510 level = NOTSET
510 511 handlers = console
511 512
512 513 [logger_routes]
513 514 level = DEBUG
514 515 handlers =
515 516 qualname = routes.middleware
516 517 ## "level = DEBUG" logs the route matched and routing variables.
517 518 propagate = 1
518 519
519 520 [logger_beaker]
520 521 level = DEBUG
521 522 handlers =
522 523 qualname = beaker.container
523 524 propagate = 1
524 525
525 526 [logger_templates]
526 527 level = INFO
527 528 handlers =
528 529 qualname = pylons.templating
529 530 propagate = 1
530 531
531 532 [logger_kallithea]
532 533 level = DEBUG
533 534 handlers =
534 535 qualname = kallithea
535 536 propagate = 1
536 537
537 538 [logger_sqlalchemy]
538 539 level = INFO
539 540 handlers = console_sql
540 541 qualname = sqlalchemy.engine
541 542 propagate = 0
542 543
543 544 [logger_whoosh_indexer]
544 545 level = DEBUG
545 546 handlers =
546 547 qualname = whoosh_indexer
547 548 propagate = 1
548 549
549 550 ##############
550 551 ## HANDLERS ##
551 552 ##############
552 553
553 554 [handler_console]
554 555 class = StreamHandler
555 556 args = (sys.stderr,)
556 557 #level = INFO
558 level = DEBUG
557 559 #formatter = generic
558 level = DEBUG
559 560 formatter = color_formatter
560 561
561 562 [handler_console_sql]
562 563 class = StreamHandler
563 564 args = (sys.stderr,)
564 565 #level = WARN
566 level = DEBUG
565 567 #formatter = generic
566 level = DEBUG
567 568 formatter = color_formatter_sql
568 569
569 570 ################
570 571 ## FORMATTERS ##
571 572 ################
572 573
573 574 [formatter_generic]
574 575 format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
575 576 datefmt = %Y-%m-%d %H:%M:%S
576 577
577 578 [formatter_color_formatter]
578 579 class = kallithea.lib.colored_formatter.ColorFormatter
579 580 format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
580 581 datefmt = %Y-%m-%d %H:%M:%S
581 582
582 583 [formatter_color_formatter_sql]
583 584 class = kallithea.lib.colored_formatter.ColorFormatterSql
584 585 format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
585 586 datefmt = %Y-%m-%d %H:%M:%S
@@ -1,585 +1,588 b''
1 1 ################################################################################
2 2 ################################################################################
3 3 # Kallithea - config for tests: #
4 4 # initial_repo_scan = true #
5 5 # vcs_full_cache = false #
6 6 # sqlalchemy and kallithea_test.sqlite #
7 7 # custom logging #
8 8 # #
9 9 # The %(here)s variable will be replaced with the parent directory of this file#
10 10 ################################################################################
11 11 ################################################################################
12 12
13 13 [DEFAULT]
14 14 debug = true
15 15 pdebug = false
16 16
17 17 ################################################################################
18 18 ## Email settings ##
19 19 ## ##
20 20 ## Refer to the documentation ("Email settings") for more details. ##
21 21 ## ##
22 22 ## It is recommended to use a valid sender address that passes access ##
23 23 ## validation and spam filtering in mail servers. ##
24 24 ################################################################################
25 25
26 26 ## 'From' header for application emails. You can optionally add a name.
27 27 ## Default:
28 28 #app_email_from = Kallithea
29 29 ## Examples:
30 30 #app_email_from = Kallithea <kallithea-noreply@example.com>
31 31 #app_email_from = kallithea-noreply@example.com
32 32
33 33 ## Subject prefix for application emails.
34 34 ## A space between this prefix and the real subject is automatically added.
35 35 ## Default:
36 36 #email_prefix =
37 37 ## Example:
38 38 #email_prefix = [Kallithea]
39 39
40 40 ## Recipients for error emails and fallback recipients of application mails.
41 41 ## Multiple addresses can be specified, space-separated.
42 42 ## Only addresses are allowed, do not add any name part.
43 43 ## Default:
44 44 #email_to =
45 45 ## Examples:
46 46 #email_to = admin@example.com
47 47 #email_to = admin@example.com another_admin@example.com
48 48
49 49 ## 'From' header for error emails. You can optionally add a name.
50 50 ## Default:
51 51 #error_email_from = pylons@yourapp.com
52 52 ## Examples:
53 53 #error_email_from = Kallithea Errors <kallithea-noreply@example.com>
54 54 #error_email_from = paste_error@example.com
55 55
56 56 ## SMTP server settings
57 57 ## Only smtp_server is mandatory. All other settings take the specified default
58 58 ## values.
59 59 #smtp_server = smtp.example.com
60 60 #smtp_username =
61 61 #smtp_password =
62 62 #smtp_port = 25
63 63 #smtp_use_tls = false
64 64 #smtp_use_ssl = false
65 65 ## SMTP authentication parameters to use (e.g. LOGIN PLAIN CRAM-MD5, etc.).
66 66 ## If empty, use any of the authentication parameters supported by the server.
67 67 #smtp_auth =
68 68
69 69 [server:main]
70 70 ## PASTE ##
71 71 #use = egg:Paste#http
72 72 ## nr of worker threads to spawn
73 73 #threadpool_workers = 5
74 74 ## max request before thread respawn
75 75 #threadpool_max_requests = 10
76 76 ## option to use threads of process
77 77 #use_threadpool = true
78 78
79 79 ## WAITRESS ##
80 80 use = egg:waitress#main
81 81 ## number of worker threads
82 82 threads = 5
83 83 ## MAX BODY SIZE 100GB
84 84 max_request_body_size = 107374182400
85 85 ## use poll instead of select, fixes fd limits, may not work on old
86 86 ## windows systems.
87 87 #asyncore_use_poll = True
88 88
89 89 ## GUNICORN ##
90 90 #use = egg:gunicorn#main
91 91 ## number of process workers. You must set `instance_id = *` when this option
92 92 ## is set to more than one worker
93 93 #workers = 1
94 94 ## process name
95 95 #proc_name = kallithea
96 96 ## type of worker class, one of sync, eventlet, gevent, tornado
97 97 ## recommended for bigger setup is using of of other than sync one
98 98 #worker_class = sync
99 99 #max_requests = 1000
100 100 ## ammount of time a worker can handle request before it gets killed and
101 101 ## restarted
102 102 #timeout = 3600
103 103
104 104 ## UWSGI ##
105 105 ## run with uwsgi --ini-paste-logged <inifile.ini>
106 106 #[uwsgi]
107 107 #socket = /tmp/uwsgi.sock
108 108 #master = true
109 109 #http = 127.0.0.1:5000
110 110
111 111 ## set as deamon and redirect all output to file
112 112 #daemonize = ./uwsgi_kallithea.log
113 113
114 114 ## master process PID
115 115 #pidfile = ./uwsgi_kallithea.pid
116 116
117 117 ## stats server with workers statistics, use uwsgitop
118 118 ## for monitoring, `uwsgitop 127.0.0.1:1717`
119 119 #stats = 127.0.0.1:1717
120 120 #memory-report = true
121 121
122 122 ## log 5XX errors
123 123 #log-5xx = true
124 124
125 125 ## Set the socket listen queue size.
126 126 #listen = 256
127 127
128 128 ## Gracefully Reload workers after the specified amount of managed requests
129 129 ## (avoid memory leaks).
130 130 #max-requests = 1000
131 131
132 132 ## enable large buffers
133 133 #buffer-size = 65535
134 134
135 135 ## socket and http timeouts ##
136 136 #http-timeout = 3600
137 137 #socket-timeout = 3600
138 138
139 139 ## Log requests slower than the specified number of milliseconds.
140 140 #log-slow = 10
141 141
142 142 ## Exit if no app can be loaded.
143 143 #need-app = true
144 144
145 145 ## Set lazy mode (load apps in workers instead of master).
146 146 #lazy = true
147 147
148 148 ## scaling ##
149 149 ## set cheaper algorithm to use, if not set default will be used
150 150 #cheaper-algo = spare
151 151
152 152 ## minimum number of workers to keep at all times
153 153 #cheaper = 1
154 154
155 155 ## number of workers to spawn at startup
156 156 #cheaper-initial = 1
157 157
158 158 ## maximum number of workers that can be spawned
159 159 #workers = 4
160 160
161 161 ## how many workers should be spawned at a time
162 162 #cheaper-step = 1
163 163
164 164 ## COMMON ##
165 165 host = 127.0.0.1
166 #port = 5000
166 167 port = 4999
167 168
168 169 ## middleware for hosting the WSGI application under a URL prefix
169 170 #[filter:proxy-prefix]
170 171 #use = egg:PasteDeploy#prefix
171 172 #prefix = /<your-prefix>
172 173
173 174 [app:main]
174 175 use = egg:kallithea
175 176 ## enable proxy prefix middleware
176 177 #filter-with = proxy-prefix
177 178
178 179 full_stack = true
179 180 static_files = true
180 181 ## Available Languages:
181 182 ## cs de fr hu ja nl_BE pl pt_BR ru sk zh_CN zh_TW
182 183 lang =
183 184 cache_dir = %(here)s/data
184 185 index_dir = %(here)s/data/index
185 186
186 187 ## perform a full repository scan on each server start, this should be
187 188 ## set to false after first startup, to allow faster server restarts.
188 189 #initial_repo_scan = false
189 190 initial_repo_scan = true
190 191
191 192 ## uncomment and set this path to use archive download cache
192 193 archive_cache_dir = %(here)s/tarballcache
193 194
194 195 ## change this to unique ID for security
195 196 app_instance_uuid = test
196 197
197 198 ## cut off limit for large diffs (size in bytes)
198 199 cut_off_limit = 256000
199 200
200 201 ## use cache version of scm repo everywhere
201 202 #vcs_full_cache = true
202 203 vcs_full_cache = false
203 204
204 205 ## force https in Kallithea, fixes https redirects, assumes it's always https
205 206 force_https = false
206 207
207 208 ## use Strict-Transport-Security headers
208 209 use_htsts = false
209 210
210 211 ## number of commits stats will parse on each iteration
211 212 commit_parse_limit = 25
212 213
213 214 ## path to git executable
214 215 git_path = git
215 216
216 217 ## git rev filter option, --all is the default filter, if you need to
217 218 ## hide all refs in changelog switch this to --branches --tags
218 219 #git_rev_filter = --branches --tags
219 220
220 221 ## RSS feed options
221 222 rss_cut_off_limit = 256000
222 223 rss_items_per_page = 10
223 224 rss_include_diff = false
224 225
225 226 ## options for showing and identifying changesets
226 227 show_sha_length = 12
228 #show_revision_number = false
227 229 show_revision_number = true
228 230
229 231 ## gist URL alias, used to create nicer urls for gist. This should be an
230 232 ## url that does rewrites to _admin/gists/<gistid>.
231 233 ## example: http://gist.example.com/{gistid}. Empty means use the internal
232 234 ## Kallithea url, ie. http[s]://kallithea.example.com/_admin/gists/<gistid>
233 235 gist_alias_url =
234 236
235 237 ## white list of API enabled controllers. This allows to add list of
236 238 ## controllers to which access will be enabled by api_key. eg: to enable
237 239 ## api access to raw_files put `FilesController:raw`, to enable access to patches
238 240 ## add `ChangesetController:changeset_patch`. This list should be "," separated
239 241 ## Syntax is <ControllerClass>:<function>. Check debug logs for generated names
240 242 ## Recommended settings below are commented out:
241 243 api_access_controllers_whitelist =
242 244 # ChangesetController:changeset_patch,
243 245 # ChangesetController:changeset_raw,
244 246 # FilesController:raw,
245 247 # FilesController:archivefile
246 248
247 249 ## default encoding used to convert from and to unicode
248 250 ## can be also a comma seperated list of encoding in case of mixed encodings
249 251 default_encoding = utf8
250 252
251 253 ## issue tracker for Kallithea (leave blank to disable, absent for default)
252 254 #bugtracker = https://bitbucket.org/conservancy/kallithea/issues
253 255
254 256 ## issue tracking mapping for commits messages
255 257 ## comment out issue_pat, issue_server, issue_prefix to enable
256 258
257 259 ## pattern to get the issues from commit messages
258 260 ## default one used here is #<numbers> with a regex passive group for `#`
259 261 ## {id} will be all groups matched from this pattern
260 262
261 263 issue_pat = (?:\s*#)(\d+)
262 264
263 265 ## server url to the issue, each {id} will be replaced with match
264 266 ## fetched from the regex and {repo} is replaced with full repository name
265 267 ## including groups {repo_name} is replaced with just name of repo
266 268
267 269 issue_server_link = https://issues.example.com/{repo}/issue/{id}
268 270
269 271 ## prefix to add to link to indicate it's an url
270 272 ## #314 will be replaced by <issue_prefix><id>
271 273
272 274 issue_prefix = #
273 275
274 276 ## issue_pat, issue_server_link, issue_prefix can have suffixes to specify
275 277 ## multiple patterns, to other issues server, wiki or others
276 278 ## below an example how to create a wiki pattern
277 279 # wiki-some-id -> https://wiki.example.com/some-id
278 280
279 281 #issue_pat_wiki = (?:wiki-)(.+)
280 282 #issue_server_link_wiki = https://wiki.example.com/{id}
281 283 #issue_prefix_wiki = WIKI-
282 284
283 285 ## alternative return HTTP header for failed authentication. Default HTTP
284 286 ## response is 401 HTTPUnauthorized. Currently Mercurial clients have trouble with
285 287 ## handling that. Set this variable to 403 to return HTTPForbidden
286 288 auth_ret_code =
287 289
288 290 ## locking return code. When repository is locked return this HTTP code. 2XX
289 291 ## codes don't break the transactions while 4XX codes do
290 292 lock_ret_code = 423
291 293
292 294 ## allows to change the repository location in settings page
293 295 allow_repo_location_change = True
294 296
295 297 ## allows to setup custom hooks in settings page
296 298 allow_custom_hooks_settings = True
297 299
298 300 ####################################
299 301 ### CELERY CONFIG ####
300 302 ####################################
301 303
302 304 use_celery = false
303 305 broker.host = localhost
304 306 broker.vhost = rabbitmqhost
305 307 broker.port = 5672
306 308 broker.user = rabbitmq
307 309 broker.password = qweqwe
308 310
309 311 celery.imports = kallithea.lib.celerylib.tasks
310 312
311 313 celery.result.backend = amqp
312 314 celery.result.dburi = amqp://
313 315 celery.result.serialier = json
314 316
315 317 #celery.send.task.error.emails = true
316 318 #celery.amqp.task.result.expires = 18000
317 319
318 320 celeryd.concurrency = 2
319 321 #celeryd.log.file = celeryd.log
320 322 celeryd.log.level = DEBUG
321 323 celeryd.max.tasks.per.child = 1
322 324
323 325 ## tasks will never be sent to the queue, but executed locally instead.
324 326 celery.always.eager = false
325 327
326 328 ####################################
327 329 ### BEAKER CACHE ####
328 330 ####################################
329 331
330 332 beaker.cache.data_dir = %(here)s/data/cache/data
331 333 beaker.cache.lock_dir = %(here)s/data/cache/lock
332 334
333 335 beaker.cache.regions = short_term,long_term,sql_cache_short
334 336
335 337 beaker.cache.short_term.type = memory
336 338 beaker.cache.short_term.expire = 60
337 339 beaker.cache.short_term.key_length = 256
338 340
339 341 beaker.cache.long_term.type = memory
340 342 beaker.cache.long_term.expire = 36000
341 343 beaker.cache.long_term.key_length = 256
342 344
343 345 beaker.cache.sql_cache_short.type = memory
346 #beaker.cache.sql_cache_short.expire = 10
344 347 beaker.cache.sql_cache_short.expire = 1
345 348 beaker.cache.sql_cache_short.key_length = 256
346 349
347 350 ####################################
348 351 ### BEAKER SESSION ####
349 352 ####################################
350 353
351 354 ## Name of session cookie. Should be unique for a given host and path, even when running
352 355 ## on different ports. Otherwise, cookie sessions will be shared and messed up.
353 356 beaker.session.key = kallithea
354 357 ## Sessions should always only be accessible by the browser, not directly by JavaScript.
355 358 beaker.session.httponly = true
356 359 ## Session lifetime. 2592000 seconds is 30 days.
357 360 beaker.session.timeout = 2592000
358 361
359 362 ## Server secret used with HMAC to ensure integrity of cookies.
360 363 beaker.session.secret = {74e0cd75-b339-478b-b129-07dd221def1f}
361 364 ## Further, encrypt the data with AES.
362 365 #beaker.session.encrypt_key = <key_for_encryption>
363 366 #beaker.session.validate_key = <validation_key>
364 367
365 368 ## Type of storage used for the session, current types are
366 369 ## dbm, file, memcached, database, and memory.
367 370
368 371 ## File system storage of session data. (default)
369 372 #beaker.session.type = file
370 373
371 374 ## Cookie only, store all session data inside the cookie. Requires secure secrets.
372 375 #beaker.session.type = cookie
373 376
374 377 ## Database storage of session data.
375 378 #beaker.session.type = ext:database
376 379 #beaker.session.sa.url = postgresql://postgres:qwe@localhost/kallithea
377 380 #beaker.session.table_name = db_session
378 381
379 382 ############################
380 383 ## ERROR HANDLING SYSTEMS ##
381 384 ############################
382 385
383 386 ####################
384 387 ### [errormator] ###
385 388 ####################
386 389
387 390 ## Errormator is tailored to work with Kallithea, see
388 391 ## http://errormator.com for details how to obtain an account
389 392 ## you must install python package `errormator_client` to make it work
390 393
391 394 ## errormator enabled
392 395 errormator = false
393 396
394 397 errormator.server_url = https://api.errormator.com
395 398 errormator.api_key = YOUR_API_KEY
396 399
397 400 ## TWEAK AMOUNT OF INFO SENT HERE
398 401
399 402 ## enables 404 error logging (default False)
400 403 errormator.report_404 = false
401 404
402 405 ## time in seconds after request is considered being slow (default 1)
403 406 errormator.slow_request_time = 1
404 407
405 408 ## record slow requests in application
406 409 ## (needs to be enabled for slow datastore recording and time tracking)
407 410 errormator.slow_requests = true
408 411
409 412 ## enable hooking to application loggers
410 413 #errormator.logging = true
411 414
412 415 ## minimum log level for log capture
413 416 #errormator.logging.level = WARNING
414 417
415 418 ## send logs only from erroneous/slow requests
416 419 ## (saves API quota for intensive logging)
417 420 errormator.logging_on_error = false
418 421
419 422 ## list of additonal keywords that should be grabbed from environ object
420 423 ## can be string with comma separated list of words in lowercase
421 424 ## (by default client will always send following info:
422 425 ## 'REMOTE_USER', 'REMOTE_ADDR', 'SERVER_NAME', 'CONTENT_TYPE' + all keys that
423 426 ## start with HTTP* this list be extended with additional keywords here
424 427 errormator.environ_keys_whitelist =
425 428
426 429 ## list of keywords that should be blanked from request object
427 430 ## can be string with comma separated list of words in lowercase
428 431 ## (by default client will always blank keys that contain following words
429 432 ## 'password', 'passwd', 'pwd', 'auth_tkt', 'secret', 'csrf'
430 433 ## this list be extended with additional keywords set here
431 434 errormator.request_keys_blacklist =
432 435
433 436 ## list of namespaces that should be ignores when gathering log entries
434 437 ## can be string with comma separated list of namespaces
435 438 ## (by default the client ignores own entries: errormator_client.client)
436 439 errormator.log_namespace_blacklist =
437 440
438 441 ################
439 442 ### [sentry] ###
440 443 ################
441 444
442 445 ## sentry is a alternative open source error aggregator
443 446 ## you must install python packages `sentry` and `raven` to enable
444 447
445 448 sentry.dsn = YOUR_DNS
446 449 sentry.servers =
447 450 sentry.name =
448 451 sentry.key =
449 452 sentry.public_key =
450 453 sentry.secret_key =
451 454 sentry.project =
452 455 sentry.site =
453 456 sentry.include_paths =
454 457 sentry.exclude_paths =
455 458
456 459 ################################################################################
457 460 ## WARNING: *THE LINE BELOW MUST BE UNCOMMENTED ON A PRODUCTION ENVIRONMENT* ##
458 461 ## Debug mode will enable the interactive debugging tool, allowing ANYONE to ##
459 462 ## execute malicious code after an exception is raised. ##
460 463 ################################################################################
461 464 set debug = false
462 465
463 466 ##################################
464 467 ### LOGVIEW CONFIG ###
465 468 ##################################
466 469
467 470 logview.sqlalchemy = #faa
468 471 logview.pylons.templating = #bfb
469 472 logview.pylons.util = #eee
470 473
471 474 #########################################################
472 475 ### DB CONFIGS - EACH DB WILL HAVE IT'S OWN CONFIG ###
473 476 #########################################################
474 477
475 478 # SQLITE [default]
476 479 #sqlalchemy.db1.url = sqlite:///%(here)s/kallithea.db?timeout=60
477 480 sqlalchemy.db1.url = sqlite:///%(here)s/kallithea_test.sqlite
478 481
479 482 # POSTGRESQL
480 483 #sqlalchemy.db1.url = postgresql://user:pass@localhost/kallithea
481 484
482 485 # MySQL
483 486 #sqlalchemy.db1.url = mysql://user:pass@localhost/kallithea
484 487
485 488 # see sqlalchemy docs for others
486 489
487 490 sqlalchemy.db1.echo = false
488 491 sqlalchemy.db1.pool_recycle = 3600
489 492 sqlalchemy.db1.convert_unicode = true
490 493
491 494 ################################
492 495 ### LOGGING CONFIGURATION ####
493 496 ################################
494 497
495 498 [loggers]
496 499 keys = root, routes, kallithea, sqlalchemy, beaker, templates, whoosh_indexer
497 500
498 501 [handlers]
499 502 keys = console, console_sql
500 503
501 504 [formatters]
502 505 keys = generic, color_formatter, color_formatter_sql
503 506
504 507 #############
505 508 ## LOGGERS ##
506 509 #############
507 510
508 511 [logger_root]
509 512 #level = NOTSET
510 513 level = DEBUG
511 514 handlers = console
512 515
513 516 [logger_routes]
514 517 level = DEBUG
515 518 handlers =
516 519 qualname = routes.middleware
517 520 ## "level = DEBUG" logs the route matched and routing variables.
518 521 propagate = 1
519 522
520 523 [logger_beaker]
521 524 level = DEBUG
522 525 handlers =
523 526 qualname = beaker.container
524 527 propagate = 1
525 528
526 529 [logger_templates]
527 530 level = INFO
528 531 handlers =
529 532 qualname = pylons.templating
530 533 propagate = 1
531 534
532 535 [logger_kallithea]
533 536 level = DEBUG
534 537 handlers =
535 538 qualname = kallithea
536 539 propagate = 1
537 540
538 541 [logger_sqlalchemy]
539 542 #level = INFO
543 level = ERROR
540 544 #handlers = console_sql
541 level = ERROR
542 545 handlers = console
543 546 qualname = sqlalchemy.engine
544 547 propagate = 0
545 548
546 549 [logger_whoosh_indexer]
547 550 level = DEBUG
548 551 handlers =
549 552 qualname = whoosh_indexer
550 553 propagate = 1
551 554
552 555 ##############
553 556 ## HANDLERS ##
554 557 ##############
555 558
556 559 [handler_console]
557 560 class = StreamHandler
558 561 args = (sys.stderr,)
559 562 #level = INFO
560 563 level = NOTSET
561 564 formatter = generic
562 565
563 566 [handler_console_sql]
564 567 class = StreamHandler
565 568 args = (sys.stderr,)
566 569 level = WARN
567 570 formatter = generic
568 571
569 572 ################
570 573 ## FORMATTERS ##
571 574 ################
572 575
573 576 [formatter_generic]
574 577 format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
575 578 datefmt = %Y-%m-%d %H:%M:%S
576 579
577 580 [formatter_color_formatter]
578 581 class = kallithea.lib.colored_formatter.ColorFormatter
579 582 format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
580 583 datefmt = %Y-%m-%d %H:%M:%S
581 584
582 585 [formatter_color_formatter_sql]
583 586 class = kallithea.lib.colored_formatter.ColorFormatterSql
584 587 format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
585 588 datefmt = %Y-%m-%d %H:%M:%S
General Comments 0
You need to be logged in to leave comments. Login now