Show More
@@ -429,11 +429,40 b' rc_cache.cache_repo_longterm.expiration_' | |||||
429 | rc_cache.cache_repo_longterm.max_size = 10000 |
|
429 | rc_cache.cache_repo_longterm.max_size = 10000 | |
430 |
|
430 | |||
431 |
|
431 | |||
|
432 | ; ********************************************* | |||
|
433 | ; `cache_general` cache for general purpose use | |||
|
434 | ; for simplicity use rc.file_namespace backend, | |||
|
435 | ; for performance and scale use rc.redis | |||
|
436 | ; ********************************************* | |||
|
437 | rc_cache.cache_general.backend = dogpile.cache.rc.file_namespace | |||
|
438 | rc_cache.cache_general.expiration_time = 43200 | |||
|
439 | ; file cache store path. Defaults to `cache_dir =` value or tempdir if both values are not set | |||
|
440 | #rc_cache.cache_general.arguments.filename = /tmp/cache_general.db | |||
|
441 | ||||
|
442 | ; alternative `cache_general` redis backend with distributed lock | |||
|
443 | #rc_cache.cache_general.backend = dogpile.cache.rc.redis | |||
|
444 | #rc_cache.cache_general.expiration_time = 300 | |||
|
445 | ||||
|
446 | ; redis_expiration_time needs to be greater then expiration_time | |||
|
447 | #rc_cache.cache_general.arguments.redis_expiration_time = 7200 | |||
|
448 | ||||
|
449 | #rc_cache.cache_general.arguments.host = localhost | |||
|
450 | #rc_cache.cache_general.arguments.port = 6379 | |||
|
451 | #rc_cache.cache_general.arguments.db = 0 | |||
|
452 | #rc_cache.cache_general.arguments.socket_timeout = 30 | |||
|
453 | ; more Redis options: https://dogpilecache.sqlalchemy.org/en/latest/api.html#redis-backends | |||
|
454 | #rc_cache.cache_general.arguments.distributed_lock = true | |||
|
455 | ||||
|
456 | ; auto-renew lock to prevent stale locks, slower but safer. Use only if problems happen | |||
|
457 | #rc_cache.cache_general.arguments.lock_auto_renewal = true | |||
|
458 | ||||
432 | ; ************************************************* |
|
459 | ; ************************************************* | |
433 | ; `cache_perms` cache for permission tree, auth TTL |
|
460 | ; `cache_perms` cache for permission tree, auth TTL | |
|
461 | ; for simplicity use rc.file_namespace backend, | |||
|
462 | ; for performance and scale use rc.redis | |||
434 | ; ************************************************* |
|
463 | ; ************************************************* | |
435 | rc_cache.cache_perms.backend = dogpile.cache.rc.file_namespace |
|
464 | rc_cache.cache_perms.backend = dogpile.cache.rc.file_namespace | |
436 | rc_cache.cache_perms.expiration_time = 300 |
|
465 | rc_cache.cache_perms.expiration_time = 3600 | |
437 | ; file cache store path. Defaults to `cache_dir =` value or tempdir if both values are not set |
|
466 | ; file cache store path. Defaults to `cache_dir =` value or tempdir if both values are not set | |
438 | #rc_cache.cache_perms.arguments.filename = /tmp/cache_perms.db |
|
467 | #rc_cache.cache_perms.arguments.filename = /tmp/cache_perms.db | |
439 |
|
468 | |||
@@ -456,6 +485,8 b' rc_cache.cache_perms.expiration_time = 3' | |||||
456 |
|
485 | |||
457 | ; *************************************************** |
|
486 | ; *************************************************** | |
458 | ; `cache_repo` cache for file tree, Readme, RSS FEEDS |
|
487 | ; `cache_repo` cache for file tree, Readme, RSS FEEDS | |
|
488 | ; for simplicity use rc.file_namespace backend, | |||
|
489 | ; for performance and scale use rc.redis | |||
459 | ; *************************************************** |
|
490 | ; *************************************************** | |
460 | rc_cache.cache_repo.backend = dogpile.cache.rc.file_namespace |
|
491 | rc_cache.cache_repo.backend = dogpile.cache.rc.file_namespace | |
461 | rc_cache.cache_repo.expiration_time = 2592000 |
|
492 | rc_cache.cache_repo.expiration_time = 2592000 | |
@@ -852,10 +883,9 b' qualname = celery' | |||||
852 | class = StreamHandler |
|
883 | class = StreamHandler | |
853 | args = (sys.stderr, ) |
|
884 | args = (sys.stderr, ) | |
854 | level = DEBUG |
|
885 | level = DEBUG | |
|
886 | ; To enable JSON formatted logs replace 'generic/color_formatter' with 'json' | |||
|
887 | ; This allows sending properly formatted logs to grafana loki or elasticsearch | |||
855 | formatter = color_formatter |
|
888 | formatter = color_formatter | |
856 | ; To enable JSON formatted logs replace generic with json |
|
|||
857 | ; This allows sending properly formatted logs to grafana loki or elasticsearch |
|
|||
858 | #formatter = json |
|
|||
859 |
|
889 | |||
860 | [handler_console_sql] |
|
890 | [handler_console_sql] | |
861 | ; "level = DEBUG" logs SQL queries and results. |
|
891 | ; "level = DEBUG" logs SQL queries and results. | |
@@ -864,6 +894,8 b' formatter = color_formatter' | |||||
864 | class = StreamHandler |
|
894 | class = StreamHandler | |
865 | args = (sys.stderr, ) |
|
895 | args = (sys.stderr, ) | |
866 | level = WARN |
|
896 | level = WARN | |
|
897 | ; To enable JSON formatted logs replace 'generic/color_formatter_sql' with 'json' | |||
|
898 | ; This allows sending properly formatted logs to grafana loki or elasticsearch | |||
867 | formatter = color_formatter_sql |
|
899 | formatter = color_formatter_sql | |
868 |
|
900 | |||
869 | ; ########## |
|
901 | ; ########## |
@@ -1,6 +1,7 b'' | |||||
1 | ; ##################### |
|
1 | ; ##################### | |
2 | ; LOGGING CONFIGURATION |
|
2 | ; LOGGING CONFIGURATION | |
3 | ; ##################### |
|
3 | ; ##################### | |
|
4 | ||||
4 | [loggers] |
|
5 | [loggers] | |
5 | keys = root, sqlalchemy, beaker, celery, rhodecode, ssh_wrapper |
|
6 | keys = root, sqlalchemy, beaker, celery, rhodecode, ssh_wrapper | |
6 |
|
7 | |||
@@ -55,10 +56,8 b' qualname = celery' | |||||
55 | class = StreamHandler |
|
56 | class = StreamHandler | |
56 | args = (sys.stderr, ) |
|
57 | args = (sys.stderr, ) | |
57 | level = $RC_LOGGING_LEVEL |
|
58 | level = $RC_LOGGING_LEVEL | |
58 | ; To enable JSON formatted logs replace generic with json |
|
59 | ; To enable JSON formatted logs replace 'generic' with 'json' | |
59 | ; This allows sending properly formatted logs to grafana loki or elasticsearch |
|
60 | ; This allows sending properly formatted logs to grafana loki or elasticsearch | |
60 | #formatter = json |
|
|||
61 | #formatter = generic |
|
|||
62 | formatter = $RC_LOGGING_FORMATTER |
|
61 | formatter = $RC_LOGGING_FORMATTER | |
63 |
|
62 | |||
64 | [handler_console_sql] |
|
63 | [handler_console_sql] | |
@@ -68,10 +67,8 b' formatter = $RC_LOGGING_FORMATTER' | |||||
68 | class = StreamHandler |
|
67 | class = StreamHandler | |
69 | args = (sys.stderr, ) |
|
68 | args = (sys.stderr, ) | |
70 | level = WARN |
|
69 | level = WARN | |
71 | ; To enable JSON formatted logs replace generic with json |
|
70 | ; To enable JSON formatted logs replace 'generic/color_formatter_sql' with 'json' | |
72 | ; This allows sending properly formatted logs to grafana loki or elasticsearch |
|
71 | ; This allows sending properly formatted logs to grafana loki or elasticsearch | |
73 | #formatter = json |
|
|||
74 | #formatter = generic |
|
|||
75 | formatter = $RC_LOGGING_FORMATTER |
|
72 | formatter = $RC_LOGGING_FORMATTER | |
76 |
|
73 | |||
77 | ; ########## |
|
74 | ; ########## | |
@@ -94,5 +91,5 b' format = %(asctime)s.%(msecs)03d [%(proc' | |||||
94 | datefmt = %Y-%m-%d %H:%M:%S |
|
91 | datefmt = %Y-%m-%d %H:%M:%S | |
95 |
|
92 | |||
96 | [formatter_json] |
|
93 | [formatter_json] | |
97 | format = %(message)s |
|
94 | format = %(timestamp)s %(levelname)s %(name)s %(message)s %(req_id)s | |
98 | class = rhodecode.lib._vendor.jsonlogger.JsonFormatter No newline at end of file |
|
95 | class = rhodecode.lib._vendor.jsonlogger.JsonFormatter |
@@ -380,11 +380,40 b' rc_cache.cache_repo_longterm.expiration_' | |||||
380 | rc_cache.cache_repo_longterm.max_size = 10000 |
|
380 | rc_cache.cache_repo_longterm.max_size = 10000 | |
381 |
|
381 | |||
382 |
|
382 | |||
|
383 | ; ********************************************* | |||
|
384 | ; `cache_general` cache for general purpose use | |||
|
385 | ; for simplicity use rc.file_namespace backend, | |||
|
386 | ; for performance and scale use rc.redis | |||
|
387 | ; ********************************************* | |||
|
388 | rc_cache.cache_general.backend = dogpile.cache.rc.file_namespace | |||
|
389 | rc_cache.cache_general.expiration_time = 43200 | |||
|
390 | ; file cache store path. Defaults to `cache_dir =` value or tempdir if both values are not set | |||
|
391 | #rc_cache.cache_general.arguments.filename = /tmp/cache_general.db | |||
|
392 | ||||
|
393 | ; alternative `cache_general` redis backend with distributed lock | |||
|
394 | #rc_cache.cache_general.backend = dogpile.cache.rc.redis | |||
|
395 | #rc_cache.cache_general.expiration_time = 300 | |||
|
396 | ||||
|
397 | ; redis_expiration_time needs to be greater then expiration_time | |||
|
398 | #rc_cache.cache_general.arguments.redis_expiration_time = 7200 | |||
|
399 | ||||
|
400 | #rc_cache.cache_general.arguments.host = localhost | |||
|
401 | #rc_cache.cache_general.arguments.port = 6379 | |||
|
402 | #rc_cache.cache_general.arguments.db = 0 | |||
|
403 | #rc_cache.cache_general.arguments.socket_timeout = 30 | |||
|
404 | ; more Redis options: https://dogpilecache.sqlalchemy.org/en/latest/api.html#redis-backends | |||
|
405 | #rc_cache.cache_general.arguments.distributed_lock = true | |||
|
406 | ||||
|
407 | ; auto-renew lock to prevent stale locks, slower but safer. Use only if problems happen | |||
|
408 | #rc_cache.cache_general.arguments.lock_auto_renewal = true | |||
|
409 | ||||
383 | ; ************************************************* |
|
410 | ; ************************************************* | |
384 | ; `cache_perms` cache for permission tree, auth TTL |
|
411 | ; `cache_perms` cache for permission tree, auth TTL | |
|
412 | ; for simplicity use rc.file_namespace backend, | |||
|
413 | ; for performance and scale use rc.redis | |||
385 | ; ************************************************* |
|
414 | ; ************************************************* | |
386 | rc_cache.cache_perms.backend = dogpile.cache.rc.file_namespace |
|
415 | rc_cache.cache_perms.backend = dogpile.cache.rc.file_namespace | |
387 | rc_cache.cache_perms.expiration_time = 300 |
|
416 | rc_cache.cache_perms.expiration_time = 3600 | |
388 | ; file cache store path. Defaults to `cache_dir =` value or tempdir if both values are not set |
|
417 | ; file cache store path. Defaults to `cache_dir =` value or tempdir if both values are not set | |
389 | #rc_cache.cache_perms.arguments.filename = /tmp/cache_perms.db |
|
418 | #rc_cache.cache_perms.arguments.filename = /tmp/cache_perms.db | |
390 |
|
419 | |||
@@ -407,6 +436,8 b' rc_cache.cache_perms.expiration_time = 3' | |||||
407 |
|
436 | |||
408 | ; *************************************************** |
|
437 | ; *************************************************** | |
409 | ; `cache_repo` cache for file tree, Readme, RSS FEEDS |
|
438 | ; `cache_repo` cache for file tree, Readme, RSS FEEDS | |
|
439 | ; for simplicity use rc.file_namespace backend, | |||
|
440 | ; for performance and scale use rc.redis | |||
410 | ; *************************************************** |
|
441 | ; *************************************************** | |
411 | rc_cache.cache_repo.backend = dogpile.cache.rc.file_namespace |
|
442 | rc_cache.cache_repo.backend = dogpile.cache.rc.file_namespace | |
412 | rc_cache.cache_repo.expiration_time = 2592000 |
|
443 | rc_cache.cache_repo.expiration_time = 2592000 | |
@@ -803,10 +834,9 b' qualname = celery' | |||||
803 | class = StreamHandler |
|
834 | class = StreamHandler | |
804 | args = (sys.stderr, ) |
|
835 | args = (sys.stderr, ) | |
805 | level = INFO |
|
836 | level = INFO | |
|
837 | ; To enable JSON formatted logs replace 'generic/color_formatter' with 'json' | |||
|
838 | ; This allows sending properly formatted logs to grafana loki or elasticsearch | |||
806 | formatter = generic |
|
839 | formatter = generic | |
807 | ; To enable JSON formatted logs replace generic with json |
|
|||
808 | ; This allows sending properly formatted logs to grafana loki or elasticsearch |
|
|||
809 | #formatter = json |
|
|||
810 |
|
840 | |||
811 | [handler_console_sql] |
|
841 | [handler_console_sql] | |
812 | ; "level = DEBUG" logs SQL queries and results. |
|
842 | ; "level = DEBUG" logs SQL queries and results. | |
@@ -815,6 +845,8 b' formatter = generic' | |||||
815 | class = StreamHandler |
|
845 | class = StreamHandler | |
816 | args = (sys.stderr, ) |
|
846 | args = (sys.stderr, ) | |
817 | level = WARN |
|
847 | level = WARN | |
|
848 | ; To enable JSON formatted logs replace 'generic/color_formatter_sql' with 'json' | |||
|
849 | ; This allows sending properly formatted logs to grafana loki or elasticsearch | |||
818 | formatter = generic |
|
850 | formatter = generic | |
819 |
|
851 | |||
820 | ; ########## |
|
852 | ; ########## |
General Comments 0
You need to be logged in to leave comments.
Login now