mirror of
https://github.com/go-admin-team/go-admin.git
synced 2026-10-15 09:47:40 +00:00
feat:added auto job
This commit is contained in:
@@ -26,7 +26,7 @@ func CustomError(c *gin.Context) {
|
||||
}
|
||||
c.Status(statusCode)
|
||||
fmt.Println(
|
||||
time.Now().Format("2006-01-02 15:04:05.9999"),
|
||||
time.Now().Format("2006-01-02 15:04:05"),
|
||||
"[ERROR]",
|
||||
c.Request.Method,
|
||||
c.Request.URL,
|
||||
|
||||
@@ -41,7 +41,7 @@ func LoggerToFile() gin.HandlerFunc {
|
||||
|
||||
// 日志格式
|
||||
fmt.Printf("%s [INFO] %s %s %3d %13v %15s \r\n",
|
||||
startTime.Format("2006-01-02 15:04:05.9999"),
|
||||
startTime.Format("2006-01-02 15:04:05"),
|
||||
reqMethod,
|
||||
reqUri,
|
||||
statusCode,
|
||||
|
||||
Reference in New Issue
Block a user