mirror of
https://github.com/mxpv/podsync.git
synced 2024-05-11 05:55:04 +00:00
Merge pull request #477 from Th0masL/enable-debug-in-config
Add option to enable debug mode in config.toml
This commit is contained in:
@@ -48,6 +48,8 @@ type Log struct {
|
||||
MaxAge int `toml:"max_age"`
|
||||
// Compress old backups
|
||||
Compress bool `toml:"compress"`
|
||||
// Debug mode
|
||||
Debug bool `toml:"debug"`
|
||||
}
|
||||
|
||||
// LoadConfig loads TOML configuration from a file path
|
||||
|
||||
@@ -92,6 +92,11 @@ func main() {
|
||||
MaxAge: cfg.Log.MaxAge,
|
||||
Compress: cfg.Log.Compress,
|
||||
})
|
||||
|
||||
// Optionally enable debug mode from config.toml
|
||||
if cfg.Log.Debug {
|
||||
log.SetLevel(log.DebugLevel)
|
||||
}
|
||||
}
|
||||
|
||||
log.WithFields(log.Fields{
|
||||
|
||||
+2
-1
@@ -82,7 +82,7 @@ vimeo = [ # Multiple keys will be rotated.
|
||||
# Note that setting '--audio-format' for audio format feeds, or '--format' or '--output' for any format may cause
|
||||
# unexpected behaviour. You should only use this if you know what you are doing, and have read up on youtube-dl's options!
|
||||
youtube_dl_args = ["--write-sub", "--embed-subs", "--sub-lang", "en,en-US,en-GB"]
|
||||
|
||||
|
||||
# When set to true, podcasts indexers such as iTunes or Google Podcasts will not index this podcast
|
||||
private_feed = true
|
||||
|
||||
@@ -123,3 +123,4 @@ max_size = 50 # MB
|
||||
max_age = 30 # days
|
||||
max_backups = 7
|
||||
compress = true
|
||||
debug = false
|
||||
|
||||
Reference in New Issue
Block a user