Documentation ¶
Index ¶
- Constants
- Variables
- func Error(text string)
- func Errorf(format string, args ...interface{})
- func Info(text string)
- func Infof(format string, args ...interface{})
- func RawLogHandler(w http.ResponseWriter, r *http.Request)
- func Success(text string)
- func Successf(format string, args ...interface{})
- func WSLogHandler(w http.ResponseWriter, r *http.Request)
- type Log
- type LogInterface
Constants ¶
View Source
const ( RequestParamError = "请求参数错误" FileNotFoundError = "Log文件不存在" InnerServerError = "服务器内部错误" )
错误消息
View Source
const LogTypeError = 1
LogTypeError 错误类型
View Source
const LogTypeInfo = 0
LogTypeInfo 信息类型
View Source
const LogTypeSuccess = 2
LogTypeSuccess 成功类型
Variables ¶
View Source
var Logger = logrus.New().WithField("name", "haruno")
Logger 应用使用的 logger 实例
View Source
var Service loggerService
Service 单例实体
Functions ¶
func RawLogHandler ¶
func RawLogHandler(w http.ResponseWriter, r *http.Request)
RawLogHandler 获取log文件
Types ¶
Click to show internal directories.
Click to hide internal directories.