##// END OF EJS Templates
celery: drop config settings not supported in Celery 4...
Mads Kiilerich -
r8134:ecd3cf91 default
parent child Browse files
Show More
@@ -1,516 +1,515 b''
1 1 ################################################################################
2 2 ################################################################################
3 3 # Kallithea - config file generated with kallithea-config #
4 4 # #
5 5 # The %(here)s variable will be replaced with the parent directory of this file#
6 6 ################################################################################
7 7 ################################################################################
8 8
9 9 [DEFAULT]
10 10
11 11 ################################################################################
12 12 ## Email settings ##
13 13 ## ##
14 14 ## Refer to the documentation ("Email settings") for more details. ##
15 15 ## ##
16 16 ## It is recommended to use a valid sender address that passes access ##
17 17 ## validation and spam filtering in mail servers. ##
18 18 ################################################################################
19 19
20 20 ## 'From' header for application emails. You can optionally add a name.
21 21 ## Default:
22 22 #app_email_from = Kallithea
23 23 ## Examples:
24 24 #app_email_from = Kallithea <kallithea-noreply@example.com>
25 25 #app_email_from = kallithea-noreply@example.com
26 26
27 27 ## Subject prefix for application emails.
28 28 ## A space between this prefix and the real subject is automatically added.
29 29 ## Default:
30 30 #email_prefix =
31 31 ## Example:
32 32 #email_prefix = [Kallithea]
33 33
34 34 ## Recipients for error emails and fallback recipients of application mails.
35 35 ## Multiple addresses can be specified, comma-separated.
36 36 ## Only addresses are allowed, do not add any name part.
37 37 ## Default:
38 38 #email_to =
39 39 ## Examples:
40 40 #email_to = admin@example.com
41 41 #email_to = admin@example.com,another_admin@example.com
42 42 email_to =
43 43
44 44 ## 'From' header for error emails. You can optionally add a name.
45 45 ## Default: (none)
46 46 ## Examples:
47 47 #error_email_from = Kallithea Errors <kallithea-noreply@example.com>
48 48 #error_email_from = kallithea_errors@example.com
49 49 error_email_from =
50 50
51 51 ## SMTP server settings
52 52 ## If specifying credentials, make sure to use secure connections.
53 53 ## Default: Send unencrypted unauthenticated mails to the specified smtp_server.
54 54 ## For "SSL", use smtp_use_ssl = true and smtp_port = 465.
55 55 ## For "STARTTLS", use smtp_use_tls = true and smtp_port = 587.
56 56 smtp_server =
57 57 smtp_username =
58 58 smtp_password =
59 59 smtp_port =
60 60 smtp_use_ssl = false
61 61 smtp_use_tls = false
62 62
63 63 ## Entry point for 'gearbox serve'
64 64 [server:main]
65 65 #host = 127.0.0.1
66 66 host = 0.0.0.0
67 67 port = 5000
68 68
69 69 ## WAITRESS ##
70 70 use = egg:waitress#main
71 71 ## number of worker threads
72 72 threads = 1
73 73 ## MAX BODY SIZE 100GB
74 74 max_request_body_size = 107374182400
75 75 ## use poll instead of select, fixes fd limits, may not work on old
76 76 ## windows systems.
77 77 #asyncore_use_poll = True
78 78
79 79 ## middleware for hosting the WSGI application under a URL prefix
80 80 #[filter:proxy-prefix]
81 81 #use = egg:PasteDeploy#prefix
82 82 #prefix = /<your-prefix>
83 83
84 84 [app:main]
85 85 use = egg:kallithea
86 86 ## enable proxy prefix middleware
87 87 #filter-with = proxy-prefix
88 88
89 89 full_stack = true
90 90 static_files = true
91 91
92 92 ## Internationalization (see setup documentation for details)
93 93 ## By default, the languages requested by the browser are used if available, with English as default.
94 94 ## Set i18n.enabled=false to disable automatic language choice.
95 95 #i18n.enabled = true
96 96 ## To Force a language, set i18n.enabled=false and specify the language in i18n.lang.
97 97 ## Valid values are the names of subdirectories in kallithea/i18n with a LC_MESSAGES/kallithea.mo
98 98 #i18n.lang = en
99 99
100 100 cache_dir = %(here)s/data
101 101 index_dir = %(here)s/data/index
102 102
103 103 ## uncomment and set this path to use archive download cache
104 104 archive_cache_dir = %(here)s/tarballcache
105 105
106 106 ## change this to unique ID for security
107 107 #app_instance_uuid = VERY-SECRET
108 108 app_instance_uuid = development-not-secret
109 109
110 110 ## cut off limit for large diffs (size in bytes)
111 111 cut_off_limit = 256000
112 112
113 113 ## force https in Kallithea, fixes https redirects, assumes it's always https
114 114 force_https = false
115 115
116 116 ## use Strict-Transport-Security headers
117 117 use_htsts = false
118 118
119 119 ## number of commits stats will parse on each iteration
120 120 commit_parse_limit = 25
121 121
122 122 ## Path to Python executable to be used for git hooks.
123 123 ## This value will be written inside the git hook scripts as the text
124 124 ## after '#!' (shebang). When empty or not defined, the value of
125 125 ## 'sys.executable' at the time of installation of the git hooks is
126 126 ## used, which is correct in many cases but for example not when using uwsgi.
127 127 ## If you change this setting, you should reinstall the Git hooks via
128 128 ## Admin > Settings > Remap and Rescan.
129 129 # git_hook_interpreter = /srv/kallithea/venv/bin/python3
130 130
131 131 ## path to git executable
132 132 git_path = git
133 133
134 134 ## git rev filter option, --all is the default filter, if you need to
135 135 ## hide all refs in changelog switch this to --branches --tags
136 136 #git_rev_filter = --branches --tags
137 137
138 138 ## RSS feed options
139 139 rss_cut_off_limit = 256000
140 140 rss_items_per_page = 10
141 141 rss_include_diff = false
142 142
143 143 ## options for showing and identifying changesets
144 144 show_sha_length = 12
145 145 show_revision_number = false
146 146
147 147 ## Canonical URL to use when creating full URLs in UI and texts.
148 148 ## Useful when the site is available under different names or protocols.
149 149 ## Defaults to what is provided in the WSGI environment.
150 150 #canonical_url = https://kallithea.example.com/repos
151 151
152 152 ## gist URL alias, used to create nicer urls for gist. This should be an
153 153 ## url that does rewrites to _admin/gists/<gistid>.
154 154 ## example: http://gist.example.com/{gistid}. Empty means use the internal
155 155 ## Kallithea url, ie. http[s]://kallithea.example.com/_admin/gists/<gistid>
156 156 gist_alias_url =
157 157
158 158 ## default encoding used to convert from and to unicode
159 159 ## can be also a comma separated list of encoding in case of mixed encodings
160 160 default_encoding = utf-8
161 161
162 162 ## Set Mercurial encoding, similar to setting HGENCODING before launching Kallithea
163 163 hgencoding = utf-8
164 164
165 165 ## issue tracker for Kallithea (leave blank to disable, absent for default)
166 166 #bugtracker = https://bitbucket.org/conservancy/kallithea/issues
167 167
168 168 ## issue tracking mapping for commit messages, comments, PR descriptions, ...
169 169 ## Refer to the documentation ("Integration with issue trackers") for more details.
170 170
171 171 ## regular expression to match issue references
172 172 ## This pattern may/should contain parenthesized groups, that can
173 173 ## be referred to in issue_server_link or issue_sub using Python backreferences
174 174 ## (e.g. \1, \2, ...). You can also create named groups with '(?P<groupname>)'.
175 175 ## To require mandatory whitespace before the issue pattern, use:
176 176 ## (?:^|(?<=\s)) before the actual pattern, and for mandatory whitespace
177 177 ## behind the issue pattern, use (?:$|(?=\s)) after the actual pattern.
178 178
179 179 issue_pat = #(\d+)
180 180
181 181 ## server url to the issue
182 182 ## This pattern may/should contain backreferences to parenthesized groups in issue_pat.
183 183 ## A backreference can be \1, \2, ... or \g<groupname> if you specified a named group
184 184 ## called 'groupname' in issue_pat.
185 185 ## The special token {repo} is replaced with the full repository name
186 186 ## including repository groups, while {repo_name} is replaced with just
187 187 ## the name of the repository.
188 188
189 189 issue_server_link = https://issues.example.com/{repo}/issue/\1
190 190
191 191 ## substitution pattern to use as the link text
192 192 ## If issue_sub is empty, the text matched by issue_pat is retained verbatim
193 193 ## for the link text. Otherwise, the link text is that of issue_sub, with any
194 194 ## backreferences to groups in issue_pat replaced.
195 195
196 196 issue_sub =
197 197
198 198 ## issue_pat, issue_server_link and issue_sub can have suffixes to specify
199 199 ## multiple patterns, to other issues server, wiki or others
200 200 ## below an example how to create a wiki pattern
201 201 # wiki-some-id -> https://wiki.example.com/some-id
202 202
203 203 #issue_pat_wiki = wiki-(\S+)
204 204 #issue_server_link_wiki = https://wiki.example.com/\1
205 205 #issue_sub_wiki = WIKI-\1
206 206
207 207 ## alternative return HTTP header for failed authentication. Default HTTP
208 208 ## response is 401 HTTPUnauthorized. Currently Mercurial clients have trouble with
209 209 ## handling that. Set this variable to 403 to return HTTPForbidden
210 210 auth_ret_code =
211 211
212 212 ## allows to change the repository location in settings page
213 213 allow_repo_location_change = True
214 214
215 215 ## allows to setup custom hooks in settings page
216 216 allow_custom_hooks_settings = True
217 217
218 218 ## extra extensions for indexing, space separated and without the leading '.'.
219 219 # index.extensions =
220 220 # gemfile
221 221 # lock
222 222
223 223 ## extra filenames for indexing, space separated
224 224 # index.filenames =
225 225 # .dockerignore
226 226 # .editorconfig
227 227 # INSTALL
228 228 # CHANGELOG
229 229
230 230 ####################################
231 231 ### SSH CONFIG ####
232 232 ####################################
233 233
234 234 ## SSH is disabled by default, until an Administrator decides to enable it.
235 235 ssh_enabled = false
236 236
237 237 ## File where users' SSH keys will be stored *if* ssh_enabled is true.
238 238 #ssh_authorized_keys = /home/kallithea/.ssh/authorized_keys
239 239
240 240 ## Path to be used in ssh_authorized_keys file to invoke kallithea-cli with ssh-serve.
241 241 #kallithea_cli_path = /srv/kallithea/venv/bin/kallithea-cli
242 242
243 243 ## Locale to be used in the ssh-serve command.
244 244 ## This is needed because an SSH client may try to use its own locale
245 245 ## settings, which may not be available on the server.
246 246 ## See `locale -a` for valid values on this system.
247 247 #ssh_locale = C.UTF-8
248 248
249 249 ####################################
250 250 ### CELERY CONFIG ####
251 251 ####################################
252 252
253 253 use_celery = false
254 254
255 255 ## Example: use the message queue on the local virtual host 'kallitheavhost' as the RabbitMQ user 'kallithea':
256 256 broker.url = amqp://kallithea:thepassword@localhost:5672/kallitheavhost
257 257
258 258 celery.result.backend = db+sqlite:///celery-results.db
259 259
260 #celery.send.task.error.emails = true
261 260 #celery.amqp.task.result.expires = 18000
262 261
263 262 celeryd.concurrency = 2
264 263 celeryd.max.tasks.per.child = 1
265 264
266 265 ## If true, tasks will never be sent to the queue, but executed locally instead.
267 266 celery.always.eager = false
268 267
269 268 ####################################
270 269 ### BEAKER CACHE ####
271 270 ####################################
272 271
273 272 beaker.cache.data_dir = %(here)s/data/cache/data
274 273 beaker.cache.lock_dir = %(here)s/data/cache/lock
275 274
276 275 beaker.cache.regions = short_term,long_term,sql_cache_short
277 276
278 277 beaker.cache.short_term.type = memory
279 278 beaker.cache.short_term.expire = 60
280 279 beaker.cache.short_term.key_length = 256
281 280
282 281 beaker.cache.long_term.type = memory
283 282 beaker.cache.long_term.expire = 36000
284 283 beaker.cache.long_term.key_length = 256
285 284
286 285 beaker.cache.sql_cache_short.type = memory
287 286 beaker.cache.sql_cache_short.expire = 10
288 287 beaker.cache.sql_cache_short.key_length = 256
289 288
290 289 ####################################
291 290 ### BEAKER SESSION ####
292 291 ####################################
293 292
294 293 ## Name of session cookie. Should be unique for a given host and path, even when running
295 294 ## on different ports. Otherwise, cookie sessions will be shared and messed up.
296 295 session.key = kallithea
297 296 ## Sessions should always only be accessible by the browser, not directly by JavaScript.
298 297 session.httponly = true
299 298 ## Session lifetime. 2592000 seconds is 30 days.
300 299 session.timeout = 2592000
301 300
302 301 ## Server secret used with HMAC to ensure integrity of cookies.
303 302 #session.secret = VERY-SECRET
304 303 session.secret = development-not-secret
305 304 ## Further, encrypt the data with AES.
306 305 #session.encrypt_key = <key_for_encryption>
307 306 #session.validate_key = <validation_key>
308 307
309 308 ## Type of storage used for the session, current types are
310 309 ## dbm, file, memcached, database, and memory.
311 310
312 311 ## File system storage of session data. (default)
313 312 #session.type = file
314 313
315 314 ## Cookie only, store all session data inside the cookie. Requires secure secrets.
316 315 #session.type = cookie
317 316
318 317 ## Database storage of session data.
319 318 #session.type = ext:database
320 319 #session.sa.url = postgresql://postgres:qwe@localhost/kallithea
321 320 #session.table_name = db_session
322 321
323 322 ############################
324 323 ## ERROR HANDLING SYSTEMS ##
325 324 ############################
326 325
327 326 # Propagate email settings to ErrorReporter of TurboGears2
328 327 # You do not normally need to change these lines
329 328 get trace_errors.smtp_server = smtp_server
330 329 get trace_errors.smtp_port = smtp_port
331 330 get trace_errors.from_address = error_email_from
332 331 get trace_errors.error_email = email_to
333 332 get trace_errors.smtp_username = smtp_username
334 333 get trace_errors.smtp_password = smtp_password
335 334 get trace_errors.smtp_use_tls = smtp_use_tls
336 335
337 336 ################################################################################
338 337 ## WARNING: *DEBUG MODE MUST BE OFF IN A PRODUCTION ENVIRONMENT* ##
339 338 ## Debug mode will enable the interactive debugging tool, allowing ANYONE to ##
340 339 ## execute malicious code after an exception is raised. ##
341 340 ################################################################################
342 341 #debug = false
343 342 debug = true
344 343
345 344 ##################################
346 345 ### LOGVIEW CONFIG ###
347 346 ##################################
348 347
349 348 logview.sqlalchemy = #faa
350 349 logview.pylons.templating = #bfb
351 350 logview.pylons.util = #eee
352 351
353 352 #########################################################
354 353 ### DB CONFIGS - EACH DB WILL HAVE IT'S OWN CONFIG ###
355 354 #########################################################
356 355
357 356 # SQLITE [default]
358 357 sqlalchemy.url = sqlite:///%(here)s/kallithea.db?timeout=60
359 358
360 359 # see sqlalchemy docs for others
361 360
362 361 sqlalchemy.pool_recycle = 3600
363 362
364 363 ################################
365 364 ### ALEMBIC CONFIGURATION ####
366 365 ################################
367 366
368 367 [alembic]
369 368 script_location = kallithea:alembic
370 369
371 370 ################################
372 371 ### LOGGING CONFIGURATION ####
373 372 ################################
374 373
375 374 [loggers]
376 375 keys = root, routes, kallithea, sqlalchemy, tg, gearbox, beaker, templates, whoosh_indexer, werkzeug, backlash
377 376
378 377 [handlers]
379 378 keys = console, console_color, console_color_sql, null
380 379
381 380 [formatters]
382 381 keys = generic, color_formatter, color_formatter_sql
383 382
384 383 #############
385 384 ## LOGGERS ##
386 385 #############
387 386
388 387 [logger_root]
389 388 level = NOTSET
390 389 #handlers = console
391 390 handlers = console_color
392 391 # For coloring based on log level:
393 392 # handlers = console_color
394 393
395 394 [logger_routes]
396 395 #level = WARN
397 396 level = DEBUG
398 397 handlers =
399 398 qualname = routes.middleware
400 399 ## "level = DEBUG" logs the route matched and routing variables.
401 400
402 401 [logger_beaker]
403 402 #level = WARN
404 403 level = DEBUG
405 404 handlers =
406 405 qualname = beaker.container
407 406
408 407 [logger_templates]
409 408 #level = WARN
410 409 level = INFO
411 410 handlers =
412 411 qualname = pylons.templating
413 412
414 413 [logger_kallithea]
415 414 #level = WARN
416 415 level = DEBUG
417 416 handlers =
418 417 qualname = kallithea
419 418
420 419 [logger_tg]
421 420 #level = WARN
422 421 level = DEBUG
423 422 handlers =
424 423 qualname = tg
425 424
426 425 [logger_gearbox]
427 426 #level = WARN
428 427 level = DEBUG
429 428 handlers =
430 429 qualname = gearbox
431 430
432 431 [logger_sqlalchemy]
433 432 level = WARN
434 433 handlers =
435 434 qualname = sqlalchemy.engine
436 435 # For coloring based on log level and pretty printing of SQL:
437 436 # level = INFO
438 437 # handlers = console_color_sql
439 438 # propagate = 0
440 439
441 440 [logger_whoosh_indexer]
442 441 #level = WARN
443 442 level = DEBUG
444 443 handlers =
445 444 qualname = whoosh_indexer
446 445
447 446 [logger_werkzeug]
448 447 level = WARN
449 448 handlers =
450 449 qualname = werkzeug
451 450
452 451 [logger_backlash]
453 452 level = WARN
454 453 handlers =
455 454 qualname = backlash
456 455
457 456 ##############
458 457 ## HANDLERS ##
459 458 ##############
460 459
461 460 [handler_console]
462 461 class = StreamHandler
463 462 args = (sys.stderr,)
464 463 formatter = generic
465 464
466 465 [handler_console_color]
467 466 # ANSI color coding based on log level
468 467 class = StreamHandler
469 468 args = (sys.stderr,)
470 469 formatter = color_formatter
471 470
472 471 [handler_console_color_sql]
473 472 # ANSI color coding and pretty printing of SQL statements
474 473 class = StreamHandler
475 474 args = (sys.stderr,)
476 475 formatter = color_formatter_sql
477 476
478 477 [handler_null]
479 478 class = NullHandler
480 479 args = ()
481 480
482 481 ################
483 482 ## FORMATTERS ##
484 483 ################
485 484
486 485 [formatter_generic]
487 486 format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
488 487 datefmt = %Y-%m-%d %H:%M:%S
489 488
490 489 [formatter_color_formatter]
491 490 class = kallithea.lib.colored_formatter.ColorFormatter
492 491 format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
493 492 datefmt = %Y-%m-%d %H:%M:%S
494 493
495 494 [formatter_color_formatter_sql]
496 495 class = kallithea.lib.colored_formatter.ColorFormatterSql
497 496 format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
498 497 datefmt = %Y-%m-%d %H:%M:%S
499 498
500 499 #################
501 500 ## SSH LOGGING ##
502 501 #################
503 502
504 503 # The default loggers use 'handler_console' that uses StreamHandler with
505 504 # destination 'sys.stderr'. In the context of the SSH server process, these log
506 505 # messages would be sent to the client, which is normally not what you want.
507 506 # By default, when running ssh-serve, just use NullHandler and disable logging
508 507 # completely. For other logging options, see:
509 508 # https://docs.python.org/2/library/logging.handlers.html
510 509
511 510 [ssh_serve:logger_root]
512 511 level = CRITICAL
513 512 handlers = null
514 513
515 514 # Note: If logging is configured with other handlers, they might need similar
516 515 # muting for ssh-serve too.
@@ -1,58 +1,58 b''
1 1 # -*- coding: utf-8 -*-
2 2
3 3 """
4 4 Kallithea wrapper of Celery
5 5
6 6 The Celery configuration is in the Kallithea ini file but must be converted to an
7 7 entirely different format before Celery can use it.
8 8
9 9 We read the configuration from tg.config at module import time. This module can
10 10 thus not be imported in global scope but must be imported on demand in function
11 11 scope after tg.config has been initialized.
12 12
13 13 To make sure that the config really has been initialized, we check one of the
14 14 mandatory settings.
15 15 """
16 16
17 17 import celery
18 18 import tg
19 19
20 20
21 21 class CeleryConfig(object):
22 22 CELERY_IMPORTS = ['kallithea.lib.celerylib.tasks']
23 23 CELERY_ACCEPT_CONTENT = ['json']
24 24 CELERY_RESULT_SERIALIZER = 'json'
25 25 CELERY_TASK_SERIALIZER = 'json'
26 26
27 27
28 28 def celery_config(config):
29 29 """Return Celery config object populated from relevant settings in a config dict, such as tg.config"""
30 30
31 31 celery_config = CeleryConfig()
32 32
33 33 PREFIXES = """ADMINS BROKER CASSANDRA CELERYBEAT CELERYD CELERYMON CELERY EMAIL SERVER""".split()
34 LIST_PARAMS = """CELERY_IMPORTS ADMINS ROUTES CELERY_ACCEPT_CONTENT""".split()
34 LIST_PARAMS = """CELERY_IMPORTS CELERY_ACCEPT_CONTENT""".split()
35 35
36 36 for config_key, config_value in sorted(config.items()):
37 37 celery_key = config_key.replace('.', '_').upper()
38 38 if celery_key.split('_', 1)[0] not in PREFIXES:
39 39 continue
40 40 if not isinstance(config_value, str):
41 41 continue
42 42 if celery_key in LIST_PARAMS:
43 43 celery_value = config_value.split()
44 44 elif config_value.isdigit():
45 45 celery_value = int(config_value)
46 46 elif config_value.lower() in ['true', 'false']:
47 47 celery_value = config_value.lower() == 'true'
48 48 else:
49 49 celery_value = config_value
50 50 setattr(celery_config, celery_key, celery_value)
51 51 return celery_config
52 52
53 53
54 54 def make_app():
55 55 """Create celery app from the TurboGears configuration file"""
56 56 app = celery.Celery()
57 57 app.config_from_object(celery_config(tg.config))
58 58 return app
@@ -1,698 +1,697 b''
1 1 ## -*- coding: utf-8 -*-
2 2 <%text>################################################################################</%text>
3 3 <%text>################################################################################</%text>
4 4 # Kallithea - config file generated with kallithea-config #
5 5 # #
6 6 # The %(here)s variable will be replaced with the parent directory of this file#
7 7 <%text>################################################################################</%text>
8 8 <%text>################################################################################</%text>
9 9
10 10 [DEFAULT]
11 11
12 12 <%text>################################################################################</%text>
13 13 <%text>## Email settings ##</%text>
14 14 <%text>## ##</%text>
15 15 <%text>## Refer to the documentation ("Email settings") for more details. ##</%text>
16 16 <%text>## ##</%text>
17 17 <%text>## It is recommended to use a valid sender address that passes access ##</%text>
18 18 <%text>## validation and spam filtering in mail servers. ##</%text>
19 19 <%text>################################################################################</%text>
20 20
21 21 <%text>## 'From' header for application emails. You can optionally add a name.</%text>
22 22 <%text>## Default:</%text>
23 23 #app_email_from = Kallithea
24 24 <%text>## Examples:</%text>
25 25 #app_email_from = Kallithea <kallithea-noreply@example.com>
26 26 #app_email_from = kallithea-noreply@example.com
27 27
28 28 <%text>## Subject prefix for application emails.</%text>
29 29 <%text>## A space between this prefix and the real subject is automatically added.</%text>
30 30 <%text>## Default:</%text>
31 31 #email_prefix =
32 32 <%text>## Example:</%text>
33 33 #email_prefix = [Kallithea]
34 34
35 35 <%text>## Recipients for error emails and fallback recipients of application mails.</%text>
36 36 <%text>## Multiple addresses can be specified, comma-separated.</%text>
37 37 <%text>## Only addresses are allowed, do not add any name part.</%text>
38 38 <%text>## Default:</%text>
39 39 #email_to =
40 40 <%text>## Examples:</%text>
41 41 #email_to = admin@example.com
42 42 #email_to = admin@example.com,another_admin@example.com
43 43 email_to =
44 44
45 45 <%text>## 'From' header for error emails. You can optionally add a name.</%text>
46 46 <%text>## Default: (none)</%text>
47 47 <%text>## Examples:</%text>
48 48 #error_email_from = Kallithea Errors <kallithea-noreply@example.com>
49 49 #error_email_from = kallithea_errors@example.com
50 50 error_email_from =
51 51
52 52 <%text>## SMTP server settings</%text>
53 53 <%text>## If specifying credentials, make sure to use secure connections.</%text>
54 54 <%text>## Default: Send unencrypted unauthenticated mails to the specified smtp_server.</%text>
55 55 <%text>## For "SSL", use smtp_use_ssl = true and smtp_port = 465.</%text>
56 56 <%text>## For "STARTTLS", use smtp_use_tls = true and smtp_port = 587.</%text>
57 57 smtp_server =
58 58 smtp_username =
59 59 smtp_password =
60 60 smtp_port =
61 61 smtp_use_ssl = false
62 62 smtp_use_tls = false
63 63
64 64 %if http_server != 'uwsgi':
65 65 <%text>## Entry point for 'gearbox serve'</%text>
66 66 [server:main]
67 67 host = ${host}
68 68 port = ${port}
69 69
70 70 %if http_server == 'gearbox':
71 71 <%text>## Gearbox default web server ##</%text>
72 72 use = egg:gearbox#wsgiref
73 73 <%text>## nr of worker threads to spawn</%text>
74 74 threadpool_workers = 1
75 75 <%text>## max request before thread respawn</%text>
76 76 threadpool_max_requests = 100
77 77 <%text>## option to use threads of process</%text>
78 78 use_threadpool = true
79 79
80 80 %elif http_server == 'gevent':
81 81 <%text>## Gearbox gevent web server ##</%text>
82 82 use = egg:gearbox#gevent
83 83
84 84 %elif http_server == 'waitress':
85 85 <%text>## WAITRESS ##</%text>
86 86 use = egg:waitress#main
87 87 <%text>## number of worker threads</%text>
88 88 threads = 1
89 89 <%text>## MAX BODY SIZE 100GB</%text>
90 90 max_request_body_size = 107374182400
91 91 <%text>## use poll instead of select, fixes fd limits, may not work on old</%text>
92 92 <%text>## windows systems.</%text>
93 93 #asyncore_use_poll = True
94 94
95 95 %elif http_server == 'gunicorn':
96 96 <%text>## GUNICORN ##</%text>
97 97 use = egg:gunicorn#main
98 98 <%text>## number of process workers. You must set `instance_id = *` when this option</%text>
99 99 <%text>## is set to more than one worker</%text>
100 100 workers = 4
101 101 <%text>## process name</%text>
102 102 proc_name = kallithea
103 103 <%text>## type of worker class, one of sync, eventlet, gevent, tornado</%text>
104 104 <%text>## recommended for bigger setup is using of of other than sync one</%text>
105 105 worker_class = sync
106 106 max_requests = 1000
107 107 <%text>## amount of time a worker can handle request before it gets killed and</%text>
108 108 <%text>## restarted</%text>
109 109 timeout = 3600
110 110
111 111 %endif
112 112 %else:
113 113 <%text>## UWSGI ##</%text>
114 114 <%text>## run with uwsgi --ini-paste-logged <inifile.ini></%text>
115 115 [uwsgi]
116 116 socket = /tmp/uwsgi.sock
117 117 master = true
118 118 http = ${host}:${port}
119 119
120 120 <%text>## set as daemon and redirect all output to file</%text>
121 121 #daemonize = ./uwsgi_kallithea.log
122 122
123 123 <%text>## master process PID</%text>
124 124 pidfile = ./uwsgi_kallithea.pid
125 125
126 126 <%text>## stats server with workers statistics, use uwsgitop</%text>
127 127 <%text>## for monitoring, `uwsgitop 127.0.0.1:1717`</%text>
128 128 stats = 127.0.0.1:1717
129 129 memory-report = true
130 130
131 131 <%text>## log 5XX errors</%text>
132 132 log-5xx = true
133 133
134 134 <%text>## Set the socket listen queue size.</%text>
135 135 listen = 128
136 136
137 137 <%text>## Gracefully Reload workers after the specified amount of managed requests</%text>
138 138 <%text>## (avoid memory leaks).</%text>
139 139 max-requests = 1000
140 140
141 141 <%text>## enable large buffers</%text>
142 142 buffer-size = 65535
143 143
144 144 <%text>## socket and http timeouts ##</%text>
145 145 http-timeout = 3600
146 146 socket-timeout = 3600
147 147
148 148 <%text>## Log requests slower than the specified number of milliseconds.</%text>
149 149 log-slow = 10
150 150
151 151 <%text>## Exit if no app can be loaded.</%text>
152 152 need-app = true
153 153
154 154 <%text>## Set lazy mode (load apps in workers instead of master).</%text>
155 155 lazy = true
156 156
157 157 <%text>## scaling ##</%text>
158 158 <%text>## set cheaper algorithm to use, if not set default will be used</%text>
159 159 cheaper-algo = spare
160 160
161 161 <%text>## minimum number of workers to keep at all times</%text>
162 162 cheaper = 1
163 163
164 164 <%text>## number of workers to spawn at startup</%text>
165 165 cheaper-initial = 1
166 166
167 167 <%text>## maximum number of workers that can be spawned</%text>
168 168 workers = 4
169 169
170 170 <%text>## how many workers should be spawned at a time</%text>
171 171 cheaper-step = 1
172 172
173 173 %endif
174 174 <%text>## middleware for hosting the WSGI application under a URL prefix</%text>
175 175 #[filter:proxy-prefix]
176 176 #use = egg:PasteDeploy#prefix
177 177 #prefix = /<your-prefix>
178 178
179 179 [app:main]
180 180 use = egg:kallithea
181 181 <%text>## enable proxy prefix middleware</%text>
182 182 #filter-with = proxy-prefix
183 183
184 184 full_stack = true
185 185 static_files = true
186 186
187 187 <%text>## Internationalization (see setup documentation for details)</%text>
188 188 <%text>## By default, the languages requested by the browser are used if available, with English as default.</%text>
189 189 <%text>## Set i18n.enabled=false to disable automatic language choice.</%text>
190 190 #i18n.enabled = true
191 191 <%text>## To Force a language, set i18n.enabled=false and specify the language in i18n.lang.</%text>
192 192 <%text>## Valid values are the names of subdirectories in kallithea/i18n with a LC_MESSAGES/kallithea.mo</%text>
193 193 #i18n.lang = en
194 194
195 195 cache_dir = %(here)s/data
196 196 index_dir = %(here)s/data/index
197 197
198 198 <%text>## uncomment and set this path to use archive download cache</%text>
199 199 archive_cache_dir = %(here)s/tarballcache
200 200
201 201 <%text>## change this to unique ID for security</%text>
202 202 app_instance_uuid = ${uuid()}
203 203
204 204 <%text>## cut off limit for large diffs (size in bytes)</%text>
205 205 cut_off_limit = 256000
206 206
207 207 <%text>## force https in Kallithea, fixes https redirects, assumes it's always https</%text>
208 208 force_https = false
209 209
210 210 <%text>## use Strict-Transport-Security headers</%text>
211 211 use_htsts = false
212 212
213 213 <%text>## number of commits stats will parse on each iteration</%text>
214 214 commit_parse_limit = 25
215 215
216 216 <%text>## Path to Python executable to be used for git hooks.</%text>
217 217 <%text>## This value will be written inside the git hook scripts as the text</%text>
218 218 <%text>## after '#!' (shebang). When empty or not defined, the value of</%text>
219 219 <%text>## 'sys.executable' at the time of installation of the git hooks is</%text>
220 220 <%text>## used, which is correct in many cases but for example not when using uwsgi.</%text>
221 221 <%text>## If you change this setting, you should reinstall the Git hooks via</%text>
222 222 <%text>## Admin > Settings > Remap and Rescan.</%text>
223 223 # git_hook_interpreter = /srv/kallithea/venv/bin/python3
224 224 %if git_hook_interpreter:
225 225 git_hook_interpreter = ${git_hook_interpreter}
226 226 %endif
227 227
228 228 <%text>## path to git executable</%text>
229 229 git_path = git
230 230
231 231 <%text>## git rev filter option, --all is the default filter, if you need to</%text>
232 232 <%text>## hide all refs in changelog switch this to --branches --tags</%text>
233 233 #git_rev_filter = --branches --tags
234 234
235 235 <%text>## RSS feed options</%text>
236 236 rss_cut_off_limit = 256000
237 237 rss_items_per_page = 10
238 238 rss_include_diff = false
239 239
240 240 <%text>## options for showing and identifying changesets</%text>
241 241 show_sha_length = 12
242 242 show_revision_number = false
243 243
244 244 <%text>## Canonical URL to use when creating full URLs in UI and texts.</%text>
245 245 <%text>## Useful when the site is available under different names or protocols.</%text>
246 246 <%text>## Defaults to what is provided in the WSGI environment.</%text>
247 247 #canonical_url = https://kallithea.example.com/repos
248 248
249 249 <%text>## gist URL alias, used to create nicer urls for gist. This should be an</%text>
250 250 <%text>## url that does rewrites to _admin/gists/<gistid>.</%text>
251 251 <%text>## example: http://gist.example.com/{gistid}. Empty means use the internal</%text>
252 252 <%text>## Kallithea url, ie. http[s]://kallithea.example.com/_admin/gists/<gistid></%text>
253 253 gist_alias_url =
254 254
255 255 <%text>## default encoding used to convert from and to unicode</%text>
256 256 <%text>## can be also a comma separated list of encoding in case of mixed encodings</%text>
257 257 default_encoding = utf-8
258 258
259 259 <%text>## Set Mercurial encoding, similar to setting HGENCODING before launching Kallithea</%text>
260 260 hgencoding = utf-8
261 261
262 262 <%text>## issue tracker for Kallithea (leave blank to disable, absent for default)</%text>
263 263 #bugtracker = https://bitbucket.org/conservancy/kallithea/issues
264 264
265 265 <%text>## issue tracking mapping for commit messages, comments, PR descriptions, ...</%text>
266 266 <%text>## Refer to the documentation ("Integration with issue trackers") for more details.</%text>
267 267
268 268 <%text>## regular expression to match issue references</%text>
269 269 <%text>## This pattern may/should contain parenthesized groups, that can</%text>
270 270 <%text>## be referred to in issue_server_link or issue_sub using Python backreferences</%text>
271 271 <%text>## (e.g. \1, \2, ...). You can also create named groups with '(?P<groupname>)'.</%text>
272 272 <%text>## To require mandatory whitespace before the issue pattern, use:</%text>
273 273 <%text>## (?:^|(?<=\s)) before the actual pattern, and for mandatory whitespace</%text>
274 274 <%text>## behind the issue pattern, use (?:$|(?=\s)) after the actual pattern.</%text>
275 275
276 276 issue_pat = #(\d+)
277 277
278 278 <%text>## server url to the issue</%text>
279 279 <%text>## This pattern may/should contain backreferences to parenthesized groups in issue_pat.</%text>
280 280 <%text>## A backreference can be \1, \2, ... or \g<groupname> if you specified a named group</%text>
281 281 <%text>## called 'groupname' in issue_pat.</%text>
282 282 <%text>## The special token {repo} is replaced with the full repository name</%text>
283 283 <%text>## including repository groups, while {repo_name} is replaced with just</%text>
284 284 <%text>## the name of the repository.</%text>
285 285
286 286 issue_server_link = https://issues.example.com/{repo}/issue/\1
287 287
288 288 <%text>## substitution pattern to use as the link text</%text>
289 289 <%text>## If issue_sub is empty, the text matched by issue_pat is retained verbatim</%text>
290 290 <%text>## for the link text. Otherwise, the link text is that of issue_sub, with any</%text>
291 291 <%text>## backreferences to groups in issue_pat replaced.</%text>
292 292
293 293 issue_sub =
294 294
295 295 <%text>## issue_pat, issue_server_link and issue_sub can have suffixes to specify</%text>
296 296 <%text>## multiple patterns, to other issues server, wiki or others</%text>
297 297 <%text>## below an example how to create a wiki pattern</%text>
298 298 # wiki-some-id -> https://wiki.example.com/some-id
299 299
300 300 #issue_pat_wiki = wiki-(\S+)
301 301 #issue_server_link_wiki = https://wiki.example.com/\1
302 302 #issue_sub_wiki = WIKI-\1
303 303
304 304 <%text>## alternative return HTTP header for failed authentication. Default HTTP</%text>
305 305 <%text>## response is 401 HTTPUnauthorized. Currently Mercurial clients have trouble with</%text>
306 306 <%text>## handling that. Set this variable to 403 to return HTTPForbidden</%text>
307 307 auth_ret_code =
308 308
309 309 <%text>## allows to change the repository location in settings page</%text>
310 310 allow_repo_location_change = True
311 311
312 312 <%text>## allows to setup custom hooks in settings page</%text>
313 313 allow_custom_hooks_settings = True
314 314
315 315 <%text>## extra extensions for indexing, space separated and without the leading '.'.</%text>
316 316 # index.extensions =
317 317 # gemfile
318 318 # lock
319 319
320 320 <%text>## extra filenames for indexing, space separated</%text>
321 321 # index.filenames =
322 322 # .dockerignore
323 323 # .editorconfig
324 324 # INSTALL
325 325 # CHANGELOG
326 326
327 327 <%text>####################################</%text>
328 328 <%text>### SSH CONFIG ####</%text>
329 329 <%text>####################################</%text>
330 330
331 331 <%text>## SSH is disabled by default, until an Administrator decides to enable it.</%text>
332 332 ssh_enabled = false
333 333
334 334 <%text>## File where users' SSH keys will be stored *if* ssh_enabled is true.</%text>
335 335 #ssh_authorized_keys = /home/kallithea/.ssh/authorized_keys
336 336 %if user_home_path:
337 337 ssh_authorized_keys = ${user_home_path}/.ssh/authorized_keys
338 338 %endif
339 339
340 340 <%text>## Path to be used in ssh_authorized_keys file to invoke kallithea-cli with ssh-serve.</%text>
341 341 #kallithea_cli_path = /srv/kallithea/venv/bin/kallithea-cli
342 342 %if kallithea_cli_path:
343 343 kallithea_cli_path = ${kallithea_cli_path}
344 344 %endif
345 345
346 346 <%text>## Locale to be used in the ssh-serve command.</%text>
347 347 <%text>## This is needed because an SSH client may try to use its own locale</%text>
348 348 <%text>## settings, which may not be available on the server.</%text>
349 349 <%text>## See `locale -a` for valid values on this system.</%text>
350 350 #ssh_locale = C.UTF-8
351 351 %if ssh_locale:
352 352 ssh_locale = ${ssh_locale}
353 353 %endif
354 354
355 355 <%text>####################################</%text>
356 356 <%text>### CELERY CONFIG ####</%text>
357 357 <%text>####################################</%text>
358 358
359 359 use_celery = false
360 360
361 361 <%text>## Example: use the message queue on the local virtual host 'kallitheavhost' as the RabbitMQ user 'kallithea':</%text>
362 362 broker.url = amqp://kallithea:thepassword@localhost:5672/kallitheavhost
363 363
364 364 celery.result.backend = db+sqlite:///celery-results.db
365 365
366 #celery.send.task.error.emails = true
367 366 #celery.amqp.task.result.expires = 18000
368 367
369 368 celeryd.concurrency = 2
370 369 celeryd.max.tasks.per.child = 1
371 370
372 371 <%text>## If true, tasks will never be sent to the queue, but executed locally instead.</%text>
373 372 celery.always.eager = false
374 373
375 374 <%text>####################################</%text>
376 375 <%text>### BEAKER CACHE ####</%text>
377 376 <%text>####################################</%text>
378 377
379 378 beaker.cache.data_dir = %(here)s/data/cache/data
380 379 beaker.cache.lock_dir = %(here)s/data/cache/lock
381 380
382 381 beaker.cache.regions = short_term,long_term,sql_cache_short
383 382
384 383 beaker.cache.short_term.type = memory
385 384 beaker.cache.short_term.expire = 60
386 385 beaker.cache.short_term.key_length = 256
387 386
388 387 beaker.cache.long_term.type = memory
389 388 beaker.cache.long_term.expire = 36000
390 389 beaker.cache.long_term.key_length = 256
391 390
392 391 beaker.cache.sql_cache_short.type = memory
393 392 beaker.cache.sql_cache_short.expire = 10
394 393 beaker.cache.sql_cache_short.key_length = 256
395 394
396 395 <%text>####################################</%text>
397 396 <%text>### BEAKER SESSION ####</%text>
398 397 <%text>####################################</%text>
399 398
400 399 <%text>## Name of session cookie. Should be unique for a given host and path, even when running</%text>
401 400 <%text>## on different ports. Otherwise, cookie sessions will be shared and messed up.</%text>
402 401 session.key = kallithea
403 402 <%text>## Sessions should always only be accessible by the browser, not directly by JavaScript.</%text>
404 403 session.httponly = true
405 404 <%text>## Session lifetime. 2592000 seconds is 30 days.</%text>
406 405 session.timeout = 2592000
407 406
408 407 <%text>## Server secret used with HMAC to ensure integrity of cookies.</%text>
409 408 session.secret = ${uuid()}
410 409 <%text>## Further, encrypt the data with AES.</%text>
411 410 #session.encrypt_key = <key_for_encryption>
412 411 #session.validate_key = <validation_key>
413 412
414 413 <%text>## Type of storage used for the session, current types are</%text>
415 414 <%text>## dbm, file, memcached, database, and memory.</%text>
416 415
417 416 <%text>## File system storage of session data. (default)</%text>
418 417 #session.type = file
419 418
420 419 <%text>## Cookie only, store all session data inside the cookie. Requires secure secrets.</%text>
421 420 #session.type = cookie
422 421
423 422 <%text>## Database storage of session data.</%text>
424 423 #session.type = ext:database
425 424 #session.sa.url = postgresql://postgres:qwe@localhost/kallithea
426 425 #session.table_name = db_session
427 426
428 427 <%text>############################</%text>
429 428 <%text>## ERROR HANDLING SYSTEMS ##</%text>
430 429 <%text>############################</%text>
431 430
432 431 # Propagate email settings to ErrorReporter of TurboGears2
433 432 # You do not normally need to change these lines
434 433 get trace_errors.smtp_server = smtp_server
435 434 get trace_errors.smtp_port = smtp_port
436 435 get trace_errors.from_address = error_email_from
437 436 get trace_errors.error_email = email_to
438 437 get trace_errors.smtp_username = smtp_username
439 438 get trace_errors.smtp_password = smtp_password
440 439 get trace_errors.smtp_use_tls = smtp_use_tls
441 440
442 441 %if error_aggregation_service == 'appenlight':
443 442 <%text>####################</%text>
444 443 <%text>### [appenlight] ###</%text>
445 444 <%text>####################</%text>
446 445
447 446 <%text>## AppEnlight is tailored to work with Kallithea, see</%text>
448 447 <%text>## http://appenlight.com for details how to obtain an account</%text>
449 448 <%text>## you must install python package `appenlight_client` to make it work</%text>
450 449
451 450 <%text>## appenlight enabled</%text>
452 451 appenlight = false
453 452
454 453 appenlight.server_url = https://api.appenlight.com
455 454 appenlight.api_key = YOUR_API_KEY
456 455
457 456 <%text>## TWEAK AMOUNT OF INFO SENT HERE</%text>
458 457
459 458 <%text>## enables 404 error logging (default False)</%text>
460 459 appenlight.report_404 = false
461 460
462 461 <%text>## time in seconds after request is considered being slow (default 1)</%text>
463 462 appenlight.slow_request_time = 1
464 463
465 464 <%text>## record slow requests in application</%text>
466 465 <%text>## (needs to be enabled for slow datastore recording and time tracking)</%text>
467 466 appenlight.slow_requests = true
468 467
469 468 <%text>## enable hooking to application loggers</%text>
470 469 #appenlight.logging = true
471 470
472 471 <%text>## minimum log level for log capture</%text>
473 472 #appenlight.logging.level = WARNING
474 473
475 474 <%text>## send logs only from erroneous/slow requests</%text>
476 475 <%text>## (saves API quota for intensive logging)</%text>
477 476 appenlight.logging_on_error = false
478 477
479 478 <%text>## list of additional keywords that should be grabbed from environ object</%text>
480 479 <%text>## can be string with comma separated list of words in lowercase</%text>
481 480 <%text>## (by default client will always send following info:</%text>
482 481 <%text>## 'REMOTE_USER', 'REMOTE_ADDR', 'SERVER_NAME', 'CONTENT_TYPE' + all keys that</%text>
483 482 <%text>## start with HTTP* this list be extended with additional keywords here</%text>
484 483 appenlight.environ_keys_whitelist =
485 484
486 485 <%text>## list of keywords that should be blanked from request object</%text>
487 486 <%text>## can be string with comma separated list of words in lowercase</%text>
488 487 <%text>## (by default client will always blank keys that contain following words</%text>
489 488 <%text>## 'password', 'passwd', 'pwd', 'auth_tkt', 'secret', 'csrf'</%text>
490 489 <%text>## this list be extended with additional keywords set here</%text>
491 490 appenlight.request_keys_blacklist =
492 491
493 492 <%text>## list of namespaces that should be ignores when gathering log entries</%text>
494 493 <%text>## can be string with comma separated list of namespaces</%text>
495 494 <%text>## (by default the client ignores own entries: appenlight_client.client)</%text>
496 495 appenlight.log_namespace_blacklist =
497 496
498 497 %elif error_aggregation_service == 'sentry':
499 498 <%text>################</%text>
500 499 <%text>### [sentry] ###</%text>
501 500 <%text>################</%text>
502 501
503 502 <%text>## sentry is a alternative open source error aggregator</%text>
504 503 <%text>## you must install python packages `sentry` and `raven` to enable</%text>
505 504
506 505 sentry.dsn = YOUR_DNS
507 506 sentry.servers =
508 507 sentry.name =
509 508 sentry.key =
510 509 sentry.public_key =
511 510 sentry.secret_key =
512 511 sentry.project =
513 512 sentry.site =
514 513 sentry.include_paths =
515 514 sentry.exclude_paths =
516 515
517 516 %endif
518 517 <%text>################################################################################</%text>
519 518 <%text>## WARNING: *DEBUG MODE MUST BE OFF IN A PRODUCTION ENVIRONMENT* ##</%text>
520 519 <%text>## Debug mode will enable the interactive debugging tool, allowing ANYONE to ##</%text>
521 520 <%text>## execute malicious code after an exception is raised. ##</%text>
522 521 <%text>################################################################################</%text>
523 522 debug = false
524 523
525 524 <%text>##################################</%text>
526 525 <%text>### LOGVIEW CONFIG ###</%text>
527 526 <%text>##################################</%text>
528 527
529 528 logview.sqlalchemy = #faa
530 529 logview.pylons.templating = #bfb
531 530 logview.pylons.util = #eee
532 531
533 532 <%text>#########################################################</%text>
534 533 <%text>### DB CONFIGS - EACH DB WILL HAVE IT'S OWN CONFIG ###</%text>
535 534 <%text>#########################################################</%text>
536 535
537 536 %if database_engine == 'sqlite':
538 537 # SQLITE [default]
539 538 sqlalchemy.url = sqlite:///%(here)s/kallithea.db?timeout=60
540 539
541 540 %elif database_engine == 'postgres':
542 541 # POSTGRESQL
543 542 sqlalchemy.url = postgresql://user:pass@localhost/kallithea
544 543
545 544 %elif database_engine == 'mysql':
546 545 # MySQL
547 546 sqlalchemy.url = mysql://user:pass@localhost/kallithea?charset=utf8
548 547
549 548 %endif
550 549 # see sqlalchemy docs for others
551 550
552 551 sqlalchemy.pool_recycle = 3600
553 552
554 553 <%text>################################</%text>
555 554 <%text>### ALEMBIC CONFIGURATION ####</%text>
556 555 <%text>################################</%text>
557 556
558 557 [alembic]
559 558 script_location = kallithea:alembic
560 559
561 560 <%text>################################</%text>
562 561 <%text>### LOGGING CONFIGURATION ####</%text>
563 562 <%text>################################</%text>
564 563
565 564 [loggers]
566 565 keys = root, routes, kallithea, sqlalchemy, tg, gearbox, beaker, templates, whoosh_indexer, werkzeug, backlash
567 566
568 567 [handlers]
569 568 keys = console, console_color, console_color_sql, null
570 569
571 570 [formatters]
572 571 keys = generic, color_formatter, color_formatter_sql
573 572
574 573 <%text>#############</%text>
575 574 <%text>## LOGGERS ##</%text>
576 575 <%text>#############</%text>
577 576
578 577 [logger_root]
579 578 level = NOTSET
580 579 handlers = console
581 580 # For coloring based on log level:
582 581 # handlers = console_color
583 582
584 583 [logger_routes]
585 584 level = WARN
586 585 handlers =
587 586 qualname = routes.middleware
588 587 <%text>## "level = DEBUG" logs the route matched and routing variables.</%text>
589 588
590 589 [logger_beaker]
591 590 level = WARN
592 591 handlers =
593 592 qualname = beaker.container
594 593
595 594 [logger_templates]
596 595 level = WARN
597 596 handlers =
598 597 qualname = pylons.templating
599 598
600 599 [logger_kallithea]
601 600 level = WARN
602 601 handlers =
603 602 qualname = kallithea
604 603
605 604 [logger_tg]
606 605 level = WARN
607 606 handlers =
608 607 qualname = tg
609 608
610 609 [logger_gearbox]
611 610 level = WARN
612 611 handlers =
613 612 qualname = gearbox
614 613
615 614 [logger_sqlalchemy]
616 615 level = WARN
617 616 handlers =
618 617 qualname = sqlalchemy.engine
619 618 # For coloring based on log level and pretty printing of SQL:
620 619 # level = INFO
621 620 # handlers = console_color_sql
622 621 # propagate = 0
623 622
624 623 [logger_whoosh_indexer]
625 624 level = WARN
626 625 handlers =
627 626 qualname = whoosh_indexer
628 627
629 628 [logger_werkzeug]
630 629 level = WARN
631 630 handlers =
632 631 qualname = werkzeug
633 632
634 633 [logger_backlash]
635 634 level = WARN
636 635 handlers =
637 636 qualname = backlash
638 637
639 638 <%text>##############</%text>
640 639 <%text>## HANDLERS ##</%text>
641 640 <%text>##############</%text>
642 641
643 642 [handler_console]
644 643 class = StreamHandler
645 644 args = (sys.stderr,)
646 645 formatter = generic
647 646
648 647 [handler_console_color]
649 648 # ANSI color coding based on log level
650 649 class = StreamHandler
651 650 args = (sys.stderr,)
652 651 formatter = color_formatter
653 652
654 653 [handler_console_color_sql]
655 654 # ANSI color coding and pretty printing of SQL statements
656 655 class = StreamHandler
657 656 args = (sys.stderr,)
658 657 formatter = color_formatter_sql
659 658
660 659 [handler_null]
661 660 class = NullHandler
662 661 args = ()
663 662
664 663 <%text>################</%text>
665 664 <%text>## FORMATTERS ##</%text>
666 665 <%text>################</%text>
667 666
668 667 [formatter_generic]
669 668 format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
670 669 datefmt = %Y-%m-%d %H:%M:%S
671 670
672 671 [formatter_color_formatter]
673 672 class = kallithea.lib.colored_formatter.ColorFormatter
674 673 format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
675 674 datefmt = %Y-%m-%d %H:%M:%S
676 675
677 676 [formatter_color_formatter_sql]
678 677 class = kallithea.lib.colored_formatter.ColorFormatterSql
679 678 format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
680 679 datefmt = %Y-%m-%d %H:%M:%S
681 680
682 681 <%text>#################</%text>
683 682 <%text>## SSH LOGGING ##</%text>
684 683 <%text>#################</%text>
685 684
686 685 # The default loggers use 'handler_console' that uses StreamHandler with
687 686 # destination 'sys.stderr'. In the context of the SSH server process, these log
688 687 # messages would be sent to the client, which is normally not what you want.
689 688 # By default, when running ssh-serve, just use NullHandler and disable logging
690 689 # completely. For other logging options, see:
691 690 # https://docs.python.org/2/library/logging.handlers.html
692 691
693 692 [ssh_serve:logger_root]
694 693 level = CRITICAL
695 694 handlers = null
696 695
697 696 # Note: If logging is configured with other handlers, they might need similar
698 697 # muting for ssh-serve too.
General Comments 0
You need to be logged in to leave comments. Login now