Skip to content

Commit

Permalink
- remove obsolete and update comment
Browse files Browse the repository at this point in the history
- remove padding for loglevel
  • Loading branch information
MatrixCrawler committed Apr 2, 2024
1 parent eebe06b commit 3439ab1
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/logging.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,14 @@ import (
"os"
)

// Init logger for the lib package
var logger = GetLogger()

// GetLogger Will initialize a logger
// GetLogger Will initialize a logger for use in other packages
func GetLogger() *logging.Logger {
logger := logging.MustGetLogger("tfswitch")

logBackend := logging.NewLogBackend(os.Stdout, "", 0)
format := logging.MustStringFormatter("%{time:15:04:05.000} %{shortfunc}: %{level:6.6s} %{message}")
format := logging.MustStringFormatter("%{time:15:04:05.000} %{shortfunc}: %{level} %{message}")
backendFormatter := logging.NewBackendFormatter(logBackend, format)
logging.SetBackend(backendFormatter)
return logger
Expand Down

0 comments on commit 3439ab1

Please sign in to comment.