Documentation
¶
Index ¶
- type Config
- type Logger
- func (l *Logger) Debug(args ...interface{})
- func (l *Logger) Debugf(format string, args ...interface{})
- func (l *Logger) Error(args ...interface{})
- func (l *Logger) Errorf(format string, args ...interface{})
- func (l *Logger) Fatal(args ...interface{})
- func (l *Logger) Fatalf(format string, args ...interface{})
- func (l *Logger) GetAllSubLoggers() map[string]*Logger
- func (l *Logger) GetSubLogger(name string) *Logger
- func (l *Logger) Info(args ...interface{})
- func (l *Logger) Infof(format string, args ...interface{})
- func (l *Logger) NewSubLogger(name string, opts *SubLoggerOpts) *Logger
- func (l *Logger) Warn(args ...interface{})
- func (l *Logger) Warnf(format string, args ...interface{})
- func (l *Logger) WithComponent(component string) *Logger
- func (l *Logger) WithError(err error) *Logger
- func (l *Logger) WithField(key string, value interface{}) *Logger
- func (l *Logger) WithFields(fields map[string]interface{}) *Logger
- func (l *Logger) WithScope(scope string) *Logger
- type SubLoggerOpts
- type TreeFormatter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Level string
ReportCaller bool
JSONFormat bool
FileOutput string
TimeFormat string
TreeFormat bool
UseColors bool
}
Config holds logger configuration
func DefaultConfig ¶
func DefaultConfig() *Config
DefaultConfig returns default logger configuration
type Logger ¶
Logger extends logrus.Logger with additional functionality
func (*Logger) Debug ¶
func (l *Logger) Debug(args ...interface{})
Convenience methods for different log levels
func (*Logger) GetAllSubLoggers ¶
GetAllSubLoggers returns all immediate sub-loggers
func (*Logger) GetSubLogger ¶
GetSubLogger retrieves an existing sub-logger by name
func (*Logger) NewSubLogger ¶
func (l *Logger) NewSubLogger(name string, opts *SubLoggerOpts) *Logger
NewSubLogger creates a new sub-logger with the given name
func (*Logger) WithComponent ¶
WithComponent adds a component field to the logger
func (*Logger) WithFields ¶
WithFields adds multiple fields to the logger context
Click to show internal directories.
Click to hide internal directories.