From 24a2f472ec8593b4734e91ac15ee5503d16ae63a Mon Sep 17 00:00:00 2001 From: Rogier Lommers Date: Tue, 30 Jan 2018 05:34:00 +0100 Subject: Add flag to enable debug logging --- cli/cli.go | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'cli') diff --git a/cli/cli.go b/cli/cli.go index 3385ab8..80231bf 100644 --- a/cli/cli.go +++ b/cli/cli.go @@ -8,6 +8,8 @@ import ( "flag" "fmt" + "github.com/miniflux/miniflux/logger" + "github.com/miniflux/miniflux/config" "github.com/miniflux/miniflux/daemon" "github.com/miniflux/miniflux/storage" @@ -22,6 +24,7 @@ func Parse() { flagFlushSessions := flag.Bool("flush-sessions", false, "Flush all sessions (disconnect users)") flagCreateAdmin := flag.Bool("create-admin", false, "Create admin user") flagResetPassword := flag.Bool("reset-password", false, "Reset user password") + flagDebugMode := flag.Bool("debug", false, "Enable debug mode (more verbose output)") flag.Parse() cfg := config.NewConfig() @@ -60,5 +63,10 @@ func Parse() { return } + if *flagDebugMode { + logger.EnableDebug() + } + + // start daemon daemon.Run(cfg, store) } -- cgit v1.2.3