From c55b9236f0f208a8689e400ddbea52858c923372 Mon Sep 17 00:00:00 2001 From: Austin Seipp Date: Tue, 14 May 2019 01:48:16 -0500 Subject: [PATCH] nixos: add services.foundationdb.traceFormat option This allows us to specify JSON trace logging, which is useful for tooling to injest/transform logs. Signed-off-by: Austin Seipp --- nixos/modules/services/databases/foundationdb.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/nixos/modules/services/databases/foundationdb.nix b/nixos/modules/services/databases/foundationdb.nix index ad24f9f4b0f..1505f92e751 100644 --- a/nixos/modules/services/databases/foundationdb.nix +++ b/nixos/modules/services/databases/foundationdb.nix @@ -35,6 +35,7 @@ let ${optionalString (cfg.class != null) "class = ${cfg.class}"} memory = ${cfg.memory} storage_memory = ${cfg.storageMemory} + trace_format = ${cfg.traceFormat} ${optionalString (cfg.tls != null) '' tls_plugin = ${pkg}/libexec/plugins/FDBLibTLS.so @@ -317,6 +318,12 @@ in default = "/run/foundationdb.pid"; description = "Path to pidfile for fdbmonitor."; }; + + traceFormat = mkOption { + type = types.enum [ "xml" "json" ]; + default = "xml"; + description = "Trace logging format."; + }; }; config = mkIf cfg.enable {