Fix default logging settings (#107)
This commit is contained in:
parent
9dc419e854
commit
27ba31366c
2 changed files with 3 additions and 4 deletions
|
@ -23,7 +23,6 @@ import (
|
||||||
"code.vikunja.io/api/pkg/swagger"
|
"code.vikunja.io/api/pkg/swagger"
|
||||||
"code.vikunja.io/api/pkg/version"
|
"code.vikunja.io/api/pkg/version"
|
||||||
"context"
|
"context"
|
||||||
"fmt"
|
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
"os"
|
"os"
|
||||||
"os/signal"
|
"os/signal"
|
||||||
|
@ -40,7 +39,7 @@ var webCmd = &cobra.Command{
|
||||||
Run: func(cmd *cobra.Command, args []string) {
|
Run: func(cmd *cobra.Command, args []string) {
|
||||||
|
|
||||||
// Version notification
|
// Version notification
|
||||||
fmt.Printf("Vikunja version %s\n", version.Version)
|
log.Infof("Vikunja version %s", version.Version)
|
||||||
|
|
||||||
// Additional swagger information
|
// Additional swagger information
|
||||||
swagger.SwaggerInfo.Version = version.Version
|
swagger.SwaggerInfo.Version = version.Version
|
||||||
|
|
|
@ -76,7 +76,7 @@ const (
|
||||||
LogErrors Key = `log.errors`
|
LogErrors Key = `log.errors`
|
||||||
LogStandard Key = `log.standard`
|
LogStandard Key = `log.standard`
|
||||||
LogDatabase Key = `log.database`
|
LogDatabase Key = `log.database`
|
||||||
LogHTTP Key = `log.echo`
|
LogHTTP Key = `log.http`
|
||||||
LogEcho Key = `log.echo`
|
LogEcho Key = `log.echo`
|
||||||
LogPath Key = `log.path`
|
LogPath Key = `log.path`
|
||||||
|
|
||||||
|
@ -185,7 +185,7 @@ func InitDefaultConfig() {
|
||||||
LogEnabled.setDefault(true)
|
LogEnabled.setDefault(true)
|
||||||
LogErrors.setDefault("stdout")
|
LogErrors.setDefault("stdout")
|
||||||
LogStandard.setDefault("stdout")
|
LogStandard.setDefault("stdout")
|
||||||
LogDatabase.setDefault(false)
|
LogDatabase.setDefault("off")
|
||||||
LogHTTP.setDefault("stdout")
|
LogHTTP.setDefault("stdout")
|
||||||
LogEcho.setDefault("off")
|
LogEcho.setDefault("off")
|
||||||
LogPath.setDefault(ServiceRootpath.GetString() + "/logs")
|
LogPath.setDefault(ServiceRootpath.GetString() + "/logs")
|
||||||
|
|
Loading…
Add table
Reference in a new issue