Documentation ¶
Index ¶
- func NewLoggo(ops ...OpsFunc) (api.Loggo, error)
- func NewRotateLogsHook(ch *RotateLogsConfig, formatter logrus.Formatter) (logrus.Hook, error)
- type Config
- type CtxHook
- type Level
- type LoggoImpl
- func (l *LoggoImpl) CtxDebug(ctx context.Context, format string, v ...interface{})
- func (l *LoggoImpl) CtxDebugl(ctx context.Context, location string, format string, v ...interface{})
- func (l *LoggoImpl) CtxError(ctx context.Context, format string, v ...interface{})
- func (l *LoggoImpl) CtxErrorl(ctx context.Context, location string, format string, v ...interface{})
- func (l *LoggoImpl) CtxFatal(ctx context.Context, format string, v ...interface{})
- func (l *LoggoImpl) CtxInfo(ctx context.Context, format string, v ...interface{})
- func (l *LoggoImpl) CtxInfol(ctx context.Context, location string, format string, v ...interface{})
- func (l *LoggoImpl) CtxTrace(ctx context.Context, format string, v ...interface{})
- func (l *LoggoImpl) CtxTracel(ctx context.Context, location string, format string, v ...interface{})
- func (l *LoggoImpl) CtxWarn(ctx context.Context, format string, v ...interface{})
- func (l *LoggoImpl) CtxWarnl(ctx context.Context, location string, format string, v ...interface{})
- func (l *LoggoImpl) CtxflFatal(ctx context.Context, location string, format string, v ...interface{})
- func (l *LoggoImpl) Debug(format string, v ...interface{})
- func (l *LoggoImpl) Error(format string, v ...interface{})
- func (l *LoggoImpl) Fatal(format string, v ...interface{})
- func (l *LoggoImpl) Info(format string, v ...interface{})
- func (l *LoggoImpl) Trace(format string, v ...interface{})
- func (l *LoggoImpl) Warn(format string, v ...interface{})
- type OpsFunc
- type RotateLogsConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewRotateLogsHook ¶
Types ¶
type Level ¶
type Level uint32
const ( // PanicLevel level, highest level of severity. Logs and then calls panic with the // message passed to Debug, Info, ... PanicLevel Level = iota // FatalLevel level. Logs and then calls `logger.Exit(1)`. It will exit even if the // logging level is set to Panic. FatalLevel // ErrorLevel level. Logs. Used for errors that should definitely be noted. // Commonly used for hooks to send errors to an error tracking service. ErrorLevel // WarnLevel level. Non-critical entries that deserve eyes. WarnLevel // InfoLevel level. General operational entries about what's going on inside the // application. InfoLevel // DebugLevel level. Usually only enabled when debugging. Very verbose logging. DebugLevel // TraceLevel level. Designates finer-grained informational events than the Debug. TraceLevel )
These are the different logging levels. You can set the logging level to log
type LoggoImpl ¶
type LoggoImpl struct { *Config // contains filtered or unexported fields }
func (*LoggoImpl) CtxflFatal ¶
type OpsFunc ¶
type OpsFunc func(cfg *Config)
func WithDisableColor ¶
func WithDisableColor() OpsFunc
func WithReportCaller ¶
func WithRotateLogs ¶
func WithRotateLogs(conf *RotateLogsConfig) OpsFunc
Click to show internal directories.
Click to hide internal directories.