Documentation ¶
Index ¶
- Constants
- func Init() error
- type Configure
- type ILoggerFactory
- type Level
- type Logger
- type LoggerAdapter
- type LoggerFacade
- func (l *LoggerFacade) Context(ctx context.Context) Logger
- func (l *LoggerFacade) Debug(format string, a ...interface{})
- func (l *LoggerFacade) Error(format string, a ...interface{})
- func (l *LoggerFacade) Fatal(format string, a ...interface{})
- func (l *LoggerFacade) Info(format string, a ...interface{})
- func (l *LoggerFacade) Panic(format string, a ...interface{})
- func (l *LoggerFacade) Trace(format string, a ...interface{})
- func (l *LoggerFacade) Warn(format string, a ...interface{})
- type LoggerFactory
- type Spec
Constants ¶
View Source
const (
DefaultDepth int = 4
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Configure ¶
type Configure struct { bean.Component Level string `json:"level" yaml:"level"` Instance string `json:"instance" yaml:"instance"` SkipIndex int `json:"skip_index" yaml:"skip_index"` Style *struct { Spec map[string]*Spec `json:"spec" yaml:"spec"` Template []string `json:"template" yaml:"template"` } `json:"style" yaml:"style"` }
type ILoggerFactory ¶
type ILoggerFactory interface {
GetLogger(name string) LoggerAdapter
}
type Logger ¶
type Logger interface { Context(ctx context.Context) Logger Trace(format string, a ...interface{}) Debug(format string, a ...interface{}) Info(format string, a ...interface{}) Warn(format string, a ...interface{}) Error(format string, a ...interface{}) Panic(format string, a ...interface{}) Fatal(format string, a ...interface{}) }
type LoggerAdapter ¶
type LoggerFacade ¶
type LoggerFacade struct { Ctx context.Context Logger LoggerAdapter Conf *Configure // contains filtered or unexported fields }
func (*LoggerFacade) Debug ¶
func (l *LoggerFacade) Debug(format string, a ...interface{})
func (*LoggerFacade) Error ¶
func (l *LoggerFacade) Error(format string, a ...interface{})
func (*LoggerFacade) Fatal ¶
func (l *LoggerFacade) Fatal(format string, a ...interface{})
func (*LoggerFacade) Info ¶
func (l *LoggerFacade) Info(format string, a ...interface{})
func (*LoggerFacade) Panic ¶
func (l *LoggerFacade) Panic(format string, a ...interface{})
func (*LoggerFacade) Trace ¶
func (l *LoggerFacade) Trace(format string, a ...interface{})
func (*LoggerFacade) Warn ¶
func (l *LoggerFacade) Warn(format string, a ...interface{})
type LoggerFactory ¶
type LoggerFactory struct { Conf *Configure LoggerFactory ILoggerFactory }
Click to show internal directories.
Click to hide internal directories.