mirror of
https://github.com/mxpv/podsync.git
synced 2024-05-11 05:55:04 +00:00
Add debug flag
This commit is contained in:
@@ -33,6 +33,7 @@ type Opts struct {
|
||||
DynamoFeedsTableName string `long:"dynamo-feeds-table" env:"DYNAMO_FEEDS_TABLE_NAME"`
|
||||
DynamoPledgesTableName string `long:"dynamo-pledges-table" env:"DYNAMO_PLEDGES_TABLE_NAME"`
|
||||
RedisURL string `long:"redis-url" required:"true" env:"REDIS_CONNECTION_URL"`
|
||||
Debug bool `long:"debug" env:"DEBUG"`
|
||||
}
|
||||
|
||||
func main() {
|
||||
@@ -51,6 +52,10 @@ func main() {
|
||||
log.WithError(err).Fatal("failed to read configuration")
|
||||
}
|
||||
|
||||
if opts.Debug {
|
||||
log.SetLevel(log.DebugLevel)
|
||||
}
|
||||
|
||||
database, err := storage.NewDynamo()
|
||||
if err != nil {
|
||||
log.WithError(err).Fatal("failed to create database")
|
||||
|
||||
Reference in New Issue
Block a user