Documentation ¶
Index ¶
- type FileMode
- type Level
- type LogConfig
- type Logger
- func (l *Logger) CapturePanic()
- func (l *Logger) Close() error
- func (l *Logger) Debug(msg string)
- func (l *Logger) Debugf(msg string, v ...any)
- func (l *Logger) Error(msg string)
- func (l *Logger) Errorf(msg string, v ...any)
- func (l *Logger) Fatal(msg string)
- func (l *Logger) Info(msg string)
- func (l *Logger) Print(msg string)
- func (l *Logger) Printf(msg string, v ...any)
- func (l *Logger) Setup(ctx context.Context, config *LogConfig)
- func (l *Logger) Trace(msg string)
- func (l *Logger) Warning(msg string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FileMode ¶
type FileMode string
FileMode is used to unmarshal a unix file mode from the config file.
type Logger ¶
type Logger struct { File string // contains filtered or unexported fields }
Logger provides some methods with baked in assumptions.
func New ¶
func New() *Logger
New returns an uninitialized logger. Config is optional, but must be provided here or with Setup().
func (*Logger) CapturePanic ¶
func (l *Logger) CapturePanic()
CapturePanic can be deferred in any go routine to log any panic that occurs.
Click to show internal directories.
Click to hide internal directories.