mirror of
https://github.com/eosswedenorg/thalos
synced 2026-08-26 20:18:13 +02:00
cmd/tools/main.go: use app/log package instead of initialize log here.
This commit is contained in:
parent
5834e60633
commit
1ccb5ff87f
1 changed files with 1 additions and 10 deletions
|
|
@ -5,6 +5,7 @@ import (
|
||||||
|
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
|
|
||||||
|
_ "github.com/eosswedenorg/thalos/app/log"
|
||||||
log "github.com/sirupsen/logrus"
|
log "github.com/sirupsen/logrus"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -16,16 +17,6 @@ var rootCmd = &cobra.Command{
|
||||||
Version: VersionString,
|
Version: VersionString,
|
||||||
}
|
}
|
||||||
|
|
||||||
func init() {
|
|
||||||
// Initialize logger
|
|
||||||
formatter := log.TextFormatter{
|
|
||||||
FullTimestamp: true,
|
|
||||||
TimestampFormat: "2006-01-02 15:04:05.0000",
|
|
||||||
}
|
|
||||||
|
|
||||||
log.SetFormatter(&formatter)
|
|
||||||
}
|
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
if err := rootCmd.Execute(); err != nil {
|
if err := rootCmd.Execute(); err != nil {
|
||||||
log.WithError(err).Fatal("Application error")
|
log.WithError(err).Fatal("Application error")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue