log improve

This commit is contained in:
darius 2024-05-09 17:59:21 +02:00
parent e1b005ce19
commit ab40f40c00

View File

@ -10,6 +10,14 @@ var logFile *os.File
func OpenLogFile(BasePath string) {
logFile, _ = os.OpenFile(path.Join(BasePath, "../../log/active-responses.log"), os.O_APPEND|os.O_WRONLY|os.O_CREATE, 0600)
_, err := logFile.WriteString(
"\n#######################################\n## START ##" +
"\n" + time.Now().String() +
"\n#######################################\n",
)
if err != nil {
panic(err)
}
}
func Log(message string) {