Documentation ¶
Overview ¶
Package llog is a log tool library. php Monolog implementation in Go. Source code and other details for the project are available at GitHub:
https://github.com/syyongx/llog
Index ¶
- type Logger
- func (l *Logger) AddRecord(level int, message string) bool
- func (l *Logger) Alert(message interface{})
- func (l *Logger) Debug(message interface{})
- func (l *Logger) Emergency(message interface{})
- func (l *Logger) Error(message interface{})
- func (l *Logger) GetHandlers() []types.IHandler
- func (l *Logger) GetLevelByName(levelName string) (int, error)
- func (l *Logger) GetLevelName(level int) (string, error)
- func (l *Logger) GetLevels() map[int]string
- func (l *Logger) GetName() string
- func (l *Logger) GetProcessor() []types.Processor
- func (l *Logger) GetTimezone(tz string) string
- func (l *Logger) Info(message interface{})
- func (l *Logger) IsHandling(level int) bool
- func (l *Logger) Log(level int, message string)
- func (l *Logger) Notice(message interface{})
- func (l *Logger) PopHandler() (types.IHandler, error)
- func (l *Logger) PopProcessor() (types.Processor, error)
- func (l *Logger) PushHandler(h types.IHandler)
- func (l *Logger) PushProcessor(p types.Processor)
- func (l *Logger) SetHandlers(handlers []types.IHandler)
- func (l *Logger) SetTimezone(tz string)
- func (l *Logger) String(data interface{}) string
- func (l *Logger) Warning(message interface{})
- type Registry
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
Logger logger struct
func (*Logger) Alert ¶
func (l *Logger) Alert(message interface{})
Alert Adds a log record at the ALERT level.
func (*Logger) Debug ¶
func (l *Logger) Debug(message interface{})
Debug Detailed debug information.
func (*Logger) Emergency ¶
func (l *Logger) Emergency(message interface{})
Emergency System is unusable.
func (*Logger) Error ¶
func (l *Logger) Error(message interface{})
Error Runtime errors that do not require immediate action but should typically be logged and monitored.
func (*Logger) GetHandlers ¶
GetHandlers Get handlers
func (*Logger) GetLevelByName ¶
GetLevelByName Gets the value by the logging level name.
func (*Logger) GetLevelName ¶
GetLevelName Gets the name of the logging level.
func (*Logger) GetProcessor ¶
GetProcessor Get processors
func (*Logger) GetTimezone ¶
GetTimezone Get timezone
func (*Logger) Info ¶
func (l *Logger) Info(message interface{})
Info Interesting events. Example: User logs in, SQL logs.
func (*Logger) IsHandling ¶
IsHandling Checks whether the Logger has a handler that listens on the given level.
func (*Logger) Notice ¶
func (l *Logger) Notice(message interface{})
Notice Normal but significant events.
func (*Logger) PopHandler ¶
PopHandler Pops a handler from the stack.
func (*Logger) PopProcessor ¶
PopProcessor Pops a processor from the stack.
func (*Logger) PushHandler ¶
PushHandler pushes a handler on to the stack.
func (*Logger) PushProcessor ¶
PushProcessor Pushes a processor on to the stack.
func (*Logger) SetHandlers ¶
SetHandlers Set handlers, replacing all existing ones.
func (*Logger) SetTimezone ¶
SetTimezone Set the timezone to be used for the timestamp of log records.
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
Registry struct
func (*Registry) RemoveLogger ¶
RemoveLogger Removes instance from registry by name or instance