r := gin.Default() // 默认启动方式,包含 Logger、Recovery 中间件
r.Use(middleware.LoggerToFile(app)) // 初始化日
log.Debug("Useful debugging information.")
log.Info("Something noteworthy happened!")
log.Warn("You should probably take a look at this.")
log.Error("Something failed but I'm not quitting.")
log.Fatal("Bye.") // 随后会触发os.Exit(1)
log.Panic("I'm bailing.") // 随后会触发panic()