diff --git a/main.go b/main.go index 330e090..5121145 100644 --- a/main.go +++ b/main.go @@ -13,14 +13,7 @@ import ( "github.com/snorwin/haproxy-reload-wrapper/pkg/utils" ) -var ( - Version = "v0.0.0" - Hash = "" -) - func main() { - log.Notice(fmt.Sprintf("haproxy-reload-wrapper version is %s-%s", Version, Hash)) - // fetch the absolut path of the haproxy executable executable, err := utils.LookupExecutablePathAbs("haproxy") if err != nil { diff --git a/pkg/log/log.go b/pkg/log/log.go index 8d0948d..68165b5 100644 --- a/pkg/log/log.go +++ b/pkg/log/log.go @@ -3,6 +3,7 @@ package log import ( "fmt" "os" + "time" ) const ( @@ -29,5 +30,5 @@ func Notice(msg string) { } func log(level string, pid int, msg string) { - fmt.Printf("%-10s (%d) : %s\n", fmt.Sprintf("[%s]", level), pid, msg) + fmt.Printf("%s %-10s (%d) : %s\n", time.Now().Format(time.RFC3339Nano), fmt.Sprintf("[%s]", level), pid, msg) }