From 44116fd9d5003f4aa041b72491e26356ed47b924 Mon Sep 17 00:00:00 2001 From: Yigit Sever Date: Thu, 15 Apr 2021 23:03:58 +0300 Subject: Switch over to big boy logging --- log.conf.yml | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 log.conf.yml (limited to 'log.conf.yml') diff --git a/log.conf.yml b/log.conf.yml new file mode 100644 index 0000000..1940669 --- /dev/null +++ b/log.conf.yml @@ -0,0 +1,41 @@ +# Scan this file for changes every 2 minutes +refresh_rate: 2 minutes + +appenders: + # An appender named "stdout" that writes to stdout with pretty colours + stdout: + kind: console + encoder: + pattern: "[{d(%Y-%m-%d %H:%M:%S)} {h({l})}] - {m}\n" + + # And this guy writes to file, also rolls the files (when they get too large) + gradecoin: + kind: rolling_file + path: "log/gradecoin.log" + append: true + encoder: + kind: pattern + pattern: "[{d(%Y-%m-%d %H:%M:%S)} {l}] - {m}\n" + + policy: + kind: compound + + trigger: + kind: size + limit: 4 mb + + roller: + kind: fixed_window + pattern: "log/gradecoin.{}.old.log" + count: 5 + base: 1 + +loggers: + gradecoin: + level: info + appenders: + - stdout + - gradecoin + additive: false + + -- cgit v1.2.3-70-g09d2