diff --git a/nix/module-joex.nix b/nix/module-joex.nix index d9285bee..99387dd1 100644 --- a/nix/module-joex.nix +++ b/nix/module-joex.nix @@ -16,6 +16,10 @@ let address = "localhost"; port = 7878; }; + logging = { + minimum-level = "Info"; + format = "Plain"; + }; mail-debug = false; jdbc = { url = "jdbc:h2:///tmp/docspell-demo.db;MODE=PostgreSQL;DATABASE_TO_LOWER=TRUE;AUTO_SERVER=TRUE"; @@ -286,6 +290,26 @@ in { default = defaults.bind; description = "Address and port bind the rest server."; }; + + logging = mkOption { + type = types.submodule({ + options = { + minimum-level = mkOption { + type = types.str; + default = defaults.logging.minimum-level; + description = "The minimum level for logging to control verbosity."; + }; + format = mkOption { + type = types.str; + default = defaults.logging.format; + description = "The log format. One of: Fancy, Plain, Json or Logfmt"; + }; + }; + }); + default = defaults.logging; + description = "Settings for logging"; + }; + mail-debug = mkOption { type = types.bool; default = defaults.mail-debug; diff --git a/nix/module-server.nix b/nix/module-server.nix index a8a886f8..f0413a4f 100644 --- a/nix/module-server.nix +++ b/nix/module-server.nix @@ -21,6 +21,10 @@ let address = "localhost"; port = 7880; }; + logging = { + minimum-level = "Info"; + format = "Plain"; + }; integration-endpoint = { enabled = false; priority = "low"; @@ -210,6 +214,25 @@ in { description = "Address and port bind the rest server."; }; + logging = mkOption { + type = types.submodule({ + options = { + minimum-level = mkOption { + type = types.str; + default = defaults.logging.minimum-level; + description = "The minimum level for logging to control verbosity."; + }; + format = mkOption { + type = types.str; + default = defaults.logging.format; + description = "The log format. One of: Fancy, Plain, Json or Logfmt"; + }; + }; + }); + default = defaults.logging; + description = "Settings for logging"; + }; + auth = mkOption { type = types.submodule({ options = {