Documentation
¶
Index ¶
- type Logger
- func (log *Logger) Debug(args ...interface{})
- func (log *Logger) DebugWithFields(message string, fields ...interface{})
- func (log *Logger) Error(args ...interface{})
- func (log *Logger) ErrorWithFields(message string, fields ...interface{})
- func (log *Logger) Fatal(args ...interface{})
- func (log *Logger) FatalWithFields(message string, fields ...interface{})
- func (log *Logger) Info(args ...interface{})
- func (log *Logger) InfoWithFields(message string, fields ...interface{})
- func (log *Logger) Panic(args ...interface{})
- func (log *Logger) PanicWithFields(message string, fields ...interface{})
- func (log *Logger) Warn(args ...interface{})
- func (log *Logger) WarnWithFields(message string, fields ...interface{})
- type Option
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
}
func NewLogger ¶
NewLogger creates a new logger with the specified log level and log format. The log level is determined by the LOG_LEVEL environment variable, defaulting to "info". The log format is determined by the LOG_FORMAT environment variable, defaulting to "text".
func (*Logger) DebugWithFields ¶
func (*Logger) ErrorWithFields ¶
func (*Logger) FatalWithFields ¶
func (*Logger) InfoWithFields ¶
func (*Logger) PanicWithFields ¶
func (*Logger) WarnWithFields ¶
type Option ¶
type Option func(*Logger)
func WithFormatter ¶
WithFormatter configures a logrus logger with the specified formatter
Click to show internal directories.
Click to hide internal directories.