From 10f7eb53f4370cab6c1ff390773772389d500e59 Mon Sep 17 00:00:00 2001 From: Gibheer Date: Thu, 17 Aug 2023 22:02:52 +0200 Subject: prepare switch to log/slog This commit prepares the switch from log to log/slog, which was introduced in Go 1.21. slog provides some useful facilities to add metadata to log entries, which should be helpful for debugging problems. This commit also adds a small transaction ID generator. It provides a common identifier between log messages, so that multiple errors can be viewed together in their order. --- monfront.conf.example | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'monfront.conf.example') diff --git a/monfront.conf.example b/monfront.conf.example index 26a6422..57da37f 100644 --- a/monfront.conf.example +++ b/monfront.conf.example @@ -64,3 +64,16 @@ mode = "all" # The list defines the usernames allowed to change data in the frontend. They # must be authenticated to get the permission. #list = ["user1", "user2"] + +[log] +# With format the log output format can be switched between `text` +# and `json` output. +#format = "text" + +# With level the amount of logs can be reduced when necessary. The supported +# levels are `error`, `warn`, `info` and `debug`. +#level = "info" + +# Output decides where to send all generated log output. It can either be a path +# or one of the special outputs `stdout` or `stderr`. +#output = "stderr" -- cgit v1.2.3-70-g09d2