From a6098084f7150df34edecf1519386bd28a527361 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Mon, 11 Oct 2021 17:42:37 +0300 Subject: Update JSON-schema to reflect all recent config file changes. --- internal/config/client.go | 2 +- internal/config/common.go | 9 +++------ internal/config/server.go | 2 +- 3 files changed, 5 insertions(+), 8 deletions(-) (limited to 'internal/config') diff --git a/internal/config/client.go b/internal/config/client.go index 8227c68..9f4df97 100644 --- a/internal/config/client.go +++ b/internal/config/client.go @@ -102,7 +102,7 @@ type termColors struct { // ClientConfig represents a DTail client configuration (empty as of now as there // are no available config options yet, but that may changes in the future). type ClientConfig struct { - TermColorsEnable bool + TermColorsEnable bool `json:",omitempty"` TermColors termColors `json:",omitempty"` } diff --git a/internal/config/common.go b/internal/config/common.go index 9d22c95..7a72cfe 100644 --- a/internal/config/common.go +++ b/internal/config/common.go @@ -12,12 +12,10 @@ type CommonConfig struct { Logger string // LogLevel defines how much is logged. LogLevel string `json:",omitempty"` - // LogStrategy defines the log rotation strategy. - LogStrategy string + // LogRotation strategy to be used. + LogRotation string // The cache directory CacheDir string - // The temp directory - TmpDir string `json:",omitempty"` } // Create a new default configuration. @@ -28,8 +26,7 @@ func newDefaultCommonConfig() *CommonConfig { LogDir: "log", Logger: "stdout", LogLevel: DefaultLogLevel, - LogStrategy: "daily", + LogRotation: "daily", CacheDir: "cache", - TmpDir: "/tmp", } } diff --git a/internal/config/server.go b/internal/config/server.go index 677f5ac..254ea0c 100644 --- a/internal/config/server.go +++ b/internal/config/server.go @@ -47,7 +47,7 @@ type ServerConfig struct { MaxConcurrentCats int // The max amount of concurrent tails per server. MaxConcurrentTails int - // The user permissions. + // The user permissions. TODO: Add to JSON schema Permissions Permissions `json:",omitempty"` // The mapr log format MapreduceLogFormat string `json:",omitempty"` -- cgit v1.2.3