log improve
This commit is contained in:
parent
e1b005ce19
commit
ab40f40c00
@ -10,6 +10,14 @@ var logFile *os.File
|
|||||||
|
|
||||||
func OpenLogFile(BasePath string) {
|
func OpenLogFile(BasePath string) {
|
||||||
logFile, _ = os.OpenFile(path.Join(BasePath, "../../log/active-responses.log"), os.O_APPEND|os.O_WRONLY|os.O_CREATE, 0600)
|
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) {
|
func Log(message string) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user