From 27ba31366cf2cf7dafb5de574d7fc254f0cce36f Mon Sep 17 00:00:00 2001 From: konrad Date: Sun, 24 Nov 2019 18:17:59 +0000 Subject: [PATCH] Fix default logging settings (#107) --- pkg/cmd/web.go | 3 +-- pkg/config/config.go | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/pkg/cmd/web.go b/pkg/cmd/web.go index c0550d9deeb..0f6c6287a2d 100644 --- a/pkg/cmd/web.go +++ b/pkg/cmd/web.go @@ -23,7 +23,6 @@ import ( "code.vikunja.io/api/pkg/swagger" "code.vikunja.io/api/pkg/version" "context" - "fmt" "github.com/spf13/cobra" "os" "os/signal" @@ -40,7 +39,7 @@ var webCmd = &cobra.Command{ Run: func(cmd *cobra.Command, args []string) { // Version notification - fmt.Printf("Vikunja version %s\n", version.Version) + log.Infof("Vikunja version %s", version.Version) // Additional swagger information swagger.SwaggerInfo.Version = version.Version diff --git a/pkg/config/config.go b/pkg/config/config.go index 6cd5ecea2bf..ecbae849e0e 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -76,7 +76,7 @@ const ( LogErrors Key = `log.errors` LogStandard Key = `log.standard` LogDatabase Key = `log.database` - LogHTTP Key = `log.echo` + LogHTTP Key = `log.http` LogEcho Key = `log.echo` LogPath Key = `log.path` @@ -185,7 +185,7 @@ func InitDefaultConfig() { LogEnabled.setDefault(true) LogErrors.setDefault("stdout") LogStandard.setDefault("stdout") - LogDatabase.setDefault(false) + LogDatabase.setDefault("off") LogHTTP.setDefault("stdout") LogEcho.setDefault("off") LogPath.setDefault(ServiceRootpath.GetString() + "/logs")