Revert "fix pubsub config flag"

This reverts commit 590f7ab83c.

590f7ab83c (r52422601)
pull/27/head
edouard 3 years ago
parent d3afc3223e
commit ca190b3822

@ -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,
},
},
},
}

@ -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()
}

@ -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()

Loading…
Cancel
Save