Updated logging

This commit is contained in:
netbenix 2021-11-06 20:55:55 +01:00
parent 8f60c9ce7c
commit ff9e4b3e3a
8 changed files with 106 additions and 30 deletions

19
main.go
View file

@ -4,29 +4,32 @@ import (
"github.com/urfave/cli/v2"
"lpm-cli/Commands"
"lpm-cli/Informations"
. "lpm-cli/Logging"
"github.com/sirupsen/logrus"
"lpm-cli/Lotus"
"os"
)
func main() {
Logger.Init()
Logger.Info("Lotus-PM was executed")
logger := Lotus.CreateLogger("mainThread", logrus.InfoLevel)
app := &cli.App {
Name: "lotus-pm",
Usage: "Lotus Package Manager",
Authors: Informations.GetAuthors(),
Copyright: "(c) 2021 LPM-Group",
Commands: []*cli.Command {
Commands.PushCommand(),
Commands.PullCommand(),
Commands.SearchCommand(),
Commands.ListCommand(),
Commands.NewPushCommand(),
Commands.NewPullCommand(),
Commands.NewSearchCommand(),
Commands.NewListCommand(),
},
}
err := app.Run(os.Args)
ErrorHandler.HandleFatal(err)
if err != nil{
logger.Fatal(err)
}
}