add log file close back
This commit is contained in:
parent
7ac4686344
commit
184622988d
@ -20,6 +20,18 @@ func OpenLogFile(BasePath string) {
|
||||
}
|
||||
}
|
||||
|
||||
func CloseLogFile() {
|
||||
_, err := logFile.WriteString(
|
||||
"\n\n#######################################\n## CLOSE ##" +
|
||||
"\n" + time.Now().String() +
|
||||
"\n#######################################\n",
|
||||
)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
logFile.Close()
|
||||
}
|
||||
|
||||
func Log(message string) {
|
||||
if _, err := logFile.WriteString("\n" + message + ": " + time.Now().String()); err != nil {
|
||||
panic(err)
|
||||
|
||||
@ -20,4 +20,5 @@ func main() {
|
||||
notification.SendNtfy(inputParams)
|
||||
}
|
||||
}
|
||||
log.CloseLogFile()
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user