diff --git a/cli/cli.go b/cli/cli.go index 6d8b1d9..e5b0211 100644 --- a/cli/cli.go +++ b/cli/cli.go @@ -24,12 +24,6 @@ func New() *cli.App { Usage: "print the version", } - configFlag := cli.StringFlag{ - Name: "config", - Aliases: []string{"c"}, - Usage: "path to config file", - } - return &cli.App{ Name: "lntop", Version: version, @@ -37,7 +31,11 @@ func New() *cli.App { EnableShellCompletion: true, Action: run, Flags: []cli.Flag{ - &configFlag, + &cli.StringFlag{ + Name: "config", + Aliases: []string{"c"}, + Usage: "path to config file", + }, }, Commands: []*cli.Command{ { @@ -45,9 +43,6 @@ func New() *cli.App { Aliases: []string{""}, Usage: "run the pubsub only", Action: pubsubRun, - Flags: []cli.Flag{ - &configFlag, - }, }, }, } diff --git a/logging/logging.go b/logging/logging.go index 78125ed..ff2c7cb 100644 --- a/logging/logging.go +++ b/logging/logging.go @@ -56,13 +56,13 @@ func New(cfg config.Logger) (Logger, error) { func NewProductionLogger(dest string) (Logger, error) { config := zap.NewProductionConfig() - config.OutputPaths = []string{"stderr", dest} + config.OutputPaths = []string{dest} return config.Build() } func NewDevelopmentLogger(dest string) (Logger, error) { config := zap.NewDevelopmentConfig() - config.OutputPaths = []string{"stderr", dest} + config.OutputPaths = []string{dest} return config.Build() } diff --git a/pubsub/pubsub.go b/pubsub/pubsub.go index c211b93..0d32459 100644 --- a/pubsub/pubsub.go +++ b/pubsub/pubsub.go @@ -33,7 +33,7 @@ func (p *PubSub) invoices(ctx context.Context, sub chan *events.Event) { go func() { for invoice := range invoices { - p.logger.Info("receive invoice", logging.Object("invoice", invoice)) + p.logger.Debug("receive invoice", logging.Object("invoice", invoice)) if invoice.Settled { sub <- events.New(events.InvoiceSettled) } else { @@ -66,7 +66,7 @@ func (p *PubSub) transactions(ctx context.Context, sub chan *events.Event) { go func() { for tx := range transactions { - p.logger.Info("receive transaction", logging.String("tx_hash", tx.TxHash)) + p.logger.Debug("receive transaction", logging.String("tx_hash", tx.TxHash)) sub <- events.New(events.TransactionCreated) } p.wg.Done() @@ -95,7 +95,7 @@ func (p *PubSub) routingUpdates(ctx context.Context, sub chan *events.Event) { go func() { for hu := range routingUpdates { - p.logger.Info("receive htlcUpdate") + p.logger.Debug("receive htlcUpdate") sub <- events.NewWithData(events.RoutingEventUpdated, hu) } p.wg.Done()