Documentation ¶
Index ¶
- type CustomLogger
- func (cl *CustomLogger) Configure(opts ...CustomLoggerOpt)
- func (cl *CustomLogger) Debug(ctx context.Context, msg interface{})
- func (cl *CustomLogger) Error(ctx context.Context, msg interface{})
- func (cl *CustomLogger) Info(ctx context.Context, msg interface{})
- func (cl *CustomLogger) LogIfError(ctx context.Context, err error)
- func (cl *CustomLogger) Warn(ctx context.Context, msg interface{})
- type CustomLoggerOpt
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CustomLogger ¶
type CustomLogger struct {
// contains filtered or unexported fields
}
func NewLogger ¶
func NewLogger(env string) *CustomLogger
func (*CustomLogger) Configure ¶
func (cl *CustomLogger) Configure(opts ...CustomLoggerOpt)
func (*CustomLogger) Debug ¶
func (cl *CustomLogger) Debug(ctx context.Context, msg interface{})
func (*CustomLogger) Error ¶
func (cl *CustomLogger) Error(ctx context.Context, msg interface{})
func (*CustomLogger) Info ¶
func (cl *CustomLogger) Info(ctx context.Context, msg interface{})
func (*CustomLogger) LogIfError ¶
func (cl *CustomLogger) LogIfError(ctx context.Context, err error)
LogIfError is a helper to log only non-nil errors
func (*CustomLogger) Warn ¶
func (cl *CustomLogger) Warn(ctx context.Context, msg interface{})
type CustomLoggerOpt ¶
type CustomLoggerOpt func(*CustomLogger) error
func WithSvcName ¶
func WithSvcName(name string) CustomLoggerOpt
func WithTimeStamp ¶
func WithTimeStamp() CustomLoggerOpt
Click to show internal directories.
Click to hide internal directories.