factor out common logging initialisation routine

This contains a lowest common denominator of pageserver and safekeeper log
initialisation routines. It uses daemonize flag to decide where to
stream log messages. In case daemonize is true log messages are
forwarded to file. Otherwise streaming to stdout is used. Usage of
stdout for log output is the default in docker side of things, so make
it easier to browse our logs via builtin docker commands.
This commit is contained in:
Dmitry Rodionov
2021-09-13 19:19:55 +03:00
committed by Dmitry
parent 6b7f3bc78c
commit 84008a2560
11 changed files with 74 additions and 122 deletions

View File

@@ -19,6 +19,12 @@ serde_json = "1"
thiserror = "1.0"
tokio = { version = "1.5.0", features = ["full"] }
slog-async = "2.6.0"
slog-stdlog = "4.1.0"
slog-scope = "4.4.0"
slog-term = "2.8.0"
slog = "2.7.0"
zenith_metrics = { path = "../zenith_metrics" }
workspace_hack = { path = "../workspace_hack" }
rand = "0.8.3"