summaryrefslogtreecommitdiff
path: root/cmd/gotosocial/common.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/gotosocial/common.go')
-rw-r--r--cmd/gotosocial/common.go9
1 files changed, 2 insertions, 7 deletions
diff --git a/cmd/gotosocial/common.go b/cmd/gotosocial/common.go
index 7b5a42652..3f4b12613 100644
--- a/cmd/gotosocial/common.go
+++ b/cmd/gotosocial/common.go
@@ -23,7 +23,6 @@ import (
"fmt"
"github.com/spf13/cobra"
- "github.com/spf13/viper"
"github.com/superseriousbusiness/gotosocial/cmd/gotosocial/action"
"github.com/superseriousbusiness/gotosocial/internal/config"
"github.com/superseriousbusiness/gotosocial/internal/log"
@@ -52,12 +51,8 @@ func preRun(cmd *cobra.Command) error {
// The idea here is to take a GTSAction and run it with the given
// context, after initializing any last-minute things like loggers etc.
func run(ctx context.Context, action action.GTSAction) error {
- // if log level has been set...
- if logLevel := viper.GetString(config.Keys.LogLevel); logLevel != "" {
- // then try to initialize the logger to that level
- if err := log.Initialize(logLevel); err != nil {
- return fmt.Errorf("error initializing log: %s", err)
- }
+ if err := log.Initialize(); err != nil {
+ return fmt.Errorf("error initializing log: %s", err)
}
return action(ctx)