summaryrefslogtreecommitdiff
path: root/internal/config/common.go
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2021-10-08 11:43:43 +0300
committerPaul Buetow <paul@buetow.org>2021-10-09 12:37:18 +0300
commit2d7ddbeae8286373ac19787dc7dde598a7cb0598 (patch)
tree9749939f8b569951e9639d29450b18c84bb8b6c1 /internal/config/common.go
parent7306afe9ab073c424ddca0ddc57950f237948118 (diff)
refactor
Diffstat (limited to 'internal/config/common.go')
-rw-r--r--internal/config/common.go14
1 files changed, 8 insertions, 6 deletions
diff --git a/internal/config/common.go b/internal/config/common.go
index 5e81bc9..9d22c95 100644
--- a/internal/config/common.go
+++ b/internal/config/common.go
@@ -6,14 +6,14 @@ type CommonConfig struct {
SSHPort int
// Enable experimental features (mainly for dev purposes)
ExperimentalFeaturesEnable bool `json:",omitempty"`
+ // LogDir defines the log directory.
+ LogDir string
+ // Logger defines the name of the logger implementation.
+ Logger string
// LogLevel defines how much is logged.
LogLevel string `json:",omitempty"`
- // The log strategy to use, one of
- // stdout: only log to stdout (useful when used with systemd)
- // daily: create a log file for every day
+ // LogStrategy defines the log rotation strategy.
LogStrategy string
- // The log directory
- LogDir string
// The cache directory
CacheDir string
// The temp directory
@@ -26,7 +26,9 @@ func newDefaultCommonConfig() *CommonConfig {
SSHPort: DefaultSSHPort,
ExperimentalFeaturesEnable: false,
LogDir: "log",
- LogLevel: "INFO",
+ Logger: "stdout",
+ LogLevel: DefaultLogLevel,
+ LogStrategy: "daily",
CacheDir: "cache",
TmpDir: "/tmp",
}