feat: logrus format

This commit is contained in:
Young Xu 2023-01-02 00:06:19 +08:00
parent 6631d4985e
commit 0ea42a3d33
Signed by: xuthus5
GPG Key ID: A23CF9620CBB55F9
2 changed files with 11 additions and 0 deletions

View File

@ -14,6 +14,15 @@ var (
)
func init() {
logrus.SetFormatter(&logrus.TextFormatter{
ForceColors: true,
EnvironmentOverrideColors: true,
DisableTimestamp: true,
DisableSorting: true,
DisableLevelTruncation: false,
PadLevelText: false,
QuoteEmptyFields: false,
})
rootCmd.AddCommand(bootstrap.Update())
}

View File

@ -47,6 +47,8 @@ func Update() *cobra.Command {
logrus.Errorf("write config failed: %v", err)
return
}
logrus.Infof("update success!")
},
}
}