2024-06-24 15:49:49 +08:00
|
|
|
// Package consts ...
|
|
|
|
//
|
|
|
|
// Description : consts ...
|
|
|
|
//
|
|
|
|
// Author : go_developer@163.com<白茶清欢>
|
|
|
|
//
|
|
|
|
// Date : 2024-06-24 15:46
|
|
|
|
package consts
|
|
|
|
|
|
|
|
const (
|
|
|
|
LogLevelDebug = "DEBUG"
|
|
|
|
LogLevelInfo = "INFO"
|
|
|
|
LogLevelWarn = "WARN"
|
|
|
|
LogLevelError = "ERROR"
|
|
|
|
LogLevelPanic = "PANIC"
|
|
|
|
)
|
|
|
|
|
|
|
|
const (
|
|
|
|
LogSplitHour = "HOUR"
|
2024-06-24 16:08:03 +08:00
|
|
|
LogSplitDay = "DAY"
|
|
|
|
LogSplitMonth = "MONTH"
|
|
|
|
LogSplitYear = "YEAR"
|
2024-06-24 15:49:49 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
const (
|
|
|
|
LogPathDefault = "logs"
|
|
|
|
)
|
2024-06-24 16:36:52 +08:00
|
|
|
|
|
|
|
const (
|
|
|
|
LogMessageKey = "message"
|
|
|
|
LogLevelKey = "level"
|
|
|
|
LogTimeKey = "time"
|
|
|
|
LogCallerKey = "caller"
|
|
|
|
)
|
|
|
|
|
|
|
|
const (
|
|
|
|
LogAccessName = "access.log"
|
|
|
|
LogRequestName = "request.log"
|
|
|
|
LogProxyName = "proxy.log"
|
|
|
|
LogBusinessName = "business.log"
|
|
|
|
LogMonitorName = "monitor.log"
|
|
|
|
LogDatabaseName = "database.log"
|
|
|
|
LogRateLimitName = "rate-limit.log"
|
|
|
|
LogEventName = "event.log"
|
|
|
|
LogCacheName = "cache.log"
|
|
|
|
)
|
2024-07-24 22:00:52 +08:00
|
|
|
|
|
|
|
const (
|
2024-07-26 10:49:39 +08:00
|
|
|
LogTypeAccess = "access" // 访问日志
|
|
|
|
LogTypeRequest = "request" // 请求日志
|
|
|
|
LogTypeOutput = "output" // 响应日志
|
|
|
|
LogTypeProxy = "proxy" // 代理请求日志
|
|
|
|
LogTypeBusiness = "business" // 业务日志
|
|
|
|
LogTypeMonitor = "monitor" // 监控日志
|
|
|
|
LogTypeDatabase = "database" // 数据库日志
|
|
|
|
LogTypeRateLimit = "rate-limit" // 流控日志
|
|
|
|
LogTypeEvent = "event" // 事件日志
|
|
|
|
LogTypeCache = "cache" // 缓存日志
|
2024-07-24 22:00:52 +08:00
|
|
|
)
|