Documentation ¶
Index ¶
- Constants
- func GetBizId(ctx context.Context) string
- func GetRequestId(ctx context.Context) string
- func GetTraceId(ctx context.Context) string
- func NewTraceId() string
- type LocalFileLogLogger
- func (s LocalFileLogLogger) Error(msg string, args ...map[string]interface{})
- func (s LocalFileLogLogger) ErrorF(msg string, err error, args ...map[string]interface{})
- func (s LocalFileLogLogger) Info(msg string, args ...map[string]interface{})
- func (s LocalFileLogLogger) NewError(msg string, args ...map[string]interface{}) error
- func (s LocalFileLogLogger) NewErrorF(msg string, err error, args ...map[string]interface{}) error
- func (s LocalFileLogLogger) Success(msg string, args ...map[string]interface{}) string
- func (s LocalFileLogLogger) Warn(msg string, args ...map[string]interface{})
- type LocalFileLogProvider
- type Logger
- type LoggerProvider
Constants ¶
View Source
const ( RequestId = "Request-Id" TraceId = "trace-id" BizId = "biz-id" UserId = "user-id" UserName = "username" IsAdmin = "is_admin" ClientId = "Client-Id" )
Variables ¶
This section is empty.
Functions ¶
func GetRequestId ¶
func GetTraceId ¶
func NewTraceId ¶
func NewTraceId() string
Types ¶
type LocalFileLogLogger ¶
func (LocalFileLogLogger) Error ¶
func (s LocalFileLogLogger) Error(msg string, args ...map[string]interface{})
func (LocalFileLogLogger) ErrorF ¶
func (s LocalFileLogLogger) ErrorF(msg string, err error, args ...map[string]interface{})
func (LocalFileLogLogger) Info ¶
func (s LocalFileLogLogger) Info(msg string, args ...map[string]interface{})
func (LocalFileLogLogger) NewError ¶
func (s LocalFileLogLogger) NewError(msg string, args ...map[string]interface{}) error
func (LocalFileLogLogger) NewErrorF ¶
func (s LocalFileLogLogger) NewErrorF(msg string, err error, args ...map[string]interface{}) error
func (LocalFileLogLogger) Success ¶
func (s LocalFileLogLogger) Success(msg string, args ...map[string]interface{}) string
func (LocalFileLogLogger) Warn ¶
func (s LocalFileLogLogger) Warn(msg string, args ...map[string]interface{})
type LocalFileLogProvider ¶
type LocalFileLogProvider struct {
// contains filtered or unexported fields
}
func NewLocalFileLogProvider ¶
func NewLocalFileLogProvider(env *env.GlobalEnv) (*LocalFileLogProvider, error)
func (LocalFileLogProvider) NewLogger ¶
func (p LocalFileLogProvider) NewLogger(commonField map[string]interface{}) Logger
type Logger ¶
type Logger interface { Info(msg string, args ...map[string]interface{}) Success(msg string, args ...map[string]interface{}) string Warn(msg string, args ...map[string]interface{}) Error(msg string, args ...map[string]interface{}) ErrorF(msg string, err error, args ...map[string]interface{}) NewError(msg string, args ...map[string]interface{}) error NewErrorF(msg string, err error, args ...map[string]interface{}) error }
type LoggerProvider ¶
LoggerProvider 日志收集器
Click to show internal directories.
Click to hide internal directories.