Updated logging
This commit is contained in:
parent
8f60c9ce7c
commit
ff9e4b3e3a
8 changed files with 106 additions and 30 deletions
|
|
@ -1,12 +1,15 @@
|
|||
package Commands
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/urfave/cli/v2"
|
||||
"lpm-cli/Tools"
|
||||
"lpm-cli/Lotus"
|
||||
)
|
||||
|
||||
func PullCommand() *cli.Command{
|
||||
func NewPullCommand() *cli.Command{
|
||||
|
||||
logger := Lotus.CreateLogger("pullCommand", logrus.WarnLevel)
|
||||
|
||||
return &cli.Command {
|
||||
Name: "pull",
|
||||
Usage: "Pull a package",
|
||||
|
|
@ -18,8 +21,7 @@ func PullCommand() *cli.Command{
|
|||
},
|
||||
OnUsageError: func(c *cli.Context, err error, isSubcommand bool) error {
|
||||
if err != nil {
|
||||
fmt.Printf("[ERROR] %s", err.Error())
|
||||
Tools.ErrorLogger.Fatal(err)
|
||||
logger.Fatal(err)
|
||||
}
|
||||
return err
|
||||
},
|
||||
|
|
|
|||
Reference in a new issue