diff --git a/infrastructure/log/log.go b/infrastructure/log/log.go index dc82c9b..93d8437 100644 --- a/infrastructure/log/log.go +++ b/infrastructure/log/log.go @@ -133,6 +133,11 @@ func ConfigLog() { fmt.Fprintln(writer, " new log file") fmt.Fprintln(writer, "==================================================") fmt.Fprintf(writer, "config:%+v\n", config.Conf) + + fmt.Fprintf(writer, "%-45s%v\n", "version", version.Version) + fmt.Fprintf(writer, "%-45s%v\n", "gitinfo", version.CommitID) + fmt.Fprintf(writer, "%-45s%v\n", "buildinfo", version.BuildInfo) + hook := NewFileHook(globalLogFormatter, writer) logger.AddHook(hook) }) diff --git a/version/version.go b/version/version.go index d828866..45d40c8 100644 --- a/version/version.go +++ b/version/version.go @@ -3,6 +3,7 @@ package version var Version = "0.0.0.0" var Gitinfo = "unknown" var BuildInfo = "1970-01-01 00:00:00 +08:00" +var CommitID = "unknown" var CUS_NAME = "TDengine"