mirror of
https://github.com/miniflux/v2.git
synced 2025-06-27 16:36:00 +00:00
Add flag to enable debug logging
This commit is contained in:
parent
40eb1b10fe
commit
24a2f472ec
2 changed files with 64 additions and 7 deletions
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue