##// END OF EJS Templates
configs: added changed require to track logging with loki or logstash
super-admin -
r4819:0f88a70e default
parent child Browse files
Show More
@@ -440,6 +440,8 b' rc_cache.cache_perms.expiration_time = 3'
440 440 ; more Redis options: https://dogpilecache.sqlalchemy.org/en/latest/api.html#redis-backends
441 441 #rc_cache.cache_perms.arguments.distributed_lock = true
442 442
443 ; auto-renew lock to prevent stale locks, slower but safer. Use only if problems happen
444 #rc_cache.cache_perms.arguments.lock_auto_renewal = true
443 445
444 446 ; ***************************************************
445 447 ; `cache_repo` cache for file tree, Readme, RSS FEEDS
@@ -463,6 +465,8 b' rc_cache.cache_repo.expiration_time = 25'
463 465 ; more Redis options: https://dogpilecache.sqlalchemy.org/en/latest/api.html#redis-backends
464 466 #rc_cache.cache_repo.arguments.distributed_lock = true
465 467
468 ; auto-renew lock to prevent stale locks, slower but safer. Use only if problems happen
469 #rc_cache.cache_repo.arguments.lock_auto_renewal = true
466 470
467 471 ; ##############
468 472 ; BEAKER SESSION
@@ -760,6 +764,7 b' appenlight.log_namespace_blacklist ='
760 764 #statsd.statsd_prefix =
761 765 #statsd.statsd_ipv6 = false
762 766
767
763 768 ; Dummy marker to add new entries after.
764 769 ; Add any custom entries below. Please don't remove this marker.
765 770 custom.conf = 1
@@ -823,6 +828,9 b' class = StreamHandler'
823 828 args = (sys.stderr, )
824 829 level = DEBUG
825 830 formatter = color_formatter
831 ; To enable JSON formatted logs replace generic with json
832 ; This allows sending properly formatted logs to grafana loki or elasticsearch
833 #formatter = json
826 834
827 835 [handler_console_sql]
828 836 ; "level = DEBUG" logs SQL queries and results.
@@ -851,3 +859,7 b' datefmt = %Y-%m-%d %H:%M:%S'
851 859 class = rhodecode.lib.logging_formatter.ColorFormatterSql
852 860 format = %(asctime)s.%(msecs)03d [%(process)d] %(levelname)-5.5s [%(name)s] %(message)s
853 861 datefmt = %Y-%m-%d %H:%M:%S
862
863 [formatter_json]
864 format = %(message)s
865 class = rhodecode.lib._vendor.jsonlogger.JsonFormatter No newline at end of file
@@ -33,6 +33,10 b' tmp_upload_dir = None'
33 33 access_log_format = (
34 34 '%(t)s %(p)s INFO [GNCRN] %(h)-15s rqt:%(L)s %(s)s %(b)-6s "%(m)s:%(U)s %(q)s" usr:%(u)s "%(f)s" "%(a)s"')
35 35
36 # loki format for easier parsing in grafana
37 #access_log_format = (
38 # 'time="%(t)s" pid=%(p)s level="INFO" type="[GNCRN]" ip="%(h)-15s" rqt="%(L)s" response_code="%(s)s" response_bytes="%(b)-6s" uri="%(m)s:%(U)s %(q)s" user=":%(u)s" user_agent="%(a)s"')
39
36 40 # self adjust workers based on CPU count
37 41 # workers = get_workers()
38 42
@@ -715,6 +715,7 b' appenlight.log_namespace_blacklist ='
715 715 #statsd.statsd_prefix =
716 716 #statsd.statsd_ipv6 = false
717 717
718
718 719 ; Dummy marker to add new entries after.
719 720 ; Add any custom entries below. Please don't remove this marker.
720 721 custom.conf = 1
@@ -778,6 +779,9 b' class = StreamHandler'
778 779 args = (sys.stderr, )
779 780 level = INFO
780 781 formatter = generic
782 ; To enable JSON formatted logs replace generic with json
783 ; This allows sending properly formatted logs to grafana loki or elasticsearch
784 #formatter = json
781 785
782 786 [handler_console_sql]
783 787 ; "level = DEBUG" logs SQL queries and results.
@@ -806,3 +810,7 b' datefmt = %Y-%m-%d %H:%M:%S'
806 810 class = rhodecode.lib.logging_formatter.ColorFormatterSql
807 811 format = %(asctime)s.%(msecs)03d [%(process)d] %(levelname)-5.5s [%(name)s] %(message)s
808 812 datefmt = %Y-%m-%d %H:%M:%S
813
814 [formatter_json]
815 format = %(message)s
816 class = rhodecode.lib._vendor.jsonlogger.JsonFormatter No newline at end of file
General Comments 0
You need to be logged in to leave comments. Login now