mirror of https://github.com/statping/statping
parent
96c4c24247
commit
6db54b8fdc
|
@ -89,9 +89,7 @@ func LogsLineHandler(w http.ResponseWriter, r *http.Request) {
|
|||
w.WriteHeader(http.StatusInternalServerError)
|
||||
return
|
||||
}
|
||||
|
||||
w.Write([]byte(utils.LastLine))
|
||||
|
||||
w.Write([]byte(utils.LastLine.(string)))
|
||||
}
|
||||
|
||||
type backups struct {
|
||||
|
|
|
@ -16,7 +16,7 @@ var (
|
|||
logLevel int
|
||||
fmtLogs *log.Logger
|
||||
ljLogger *lumberjack.Logger
|
||||
LastLine string
|
||||
LastLine interface{}
|
||||
)
|
||||
|
||||
func InitLogs() {
|
||||
|
@ -67,7 +67,7 @@ func Panic(err interface{}) {
|
|||
}
|
||||
|
||||
func Log(level int, err interface{}) {
|
||||
LastLine = err.(string)
|
||||
LastLine = err
|
||||
switch level {
|
||||
case 5:
|
||||
fmt.Printf("PANIC: %v\n", err)
|
||||
|
|
Loading…
Reference in New Issue