This section is empty.


This section is empty.


This section is empty.


type Logger

type Logger struct {
	// contains filtered or unexported fields

func New

func New(name string, version string, opts ...Option) *Logger

    New creates a new logger with all the important fields set.

    func NewAudit

    func NewAudit(name string, version string, opts ...Option) *Logger

    func (*Logger) LeakSensitiveData

    func (l *Logger) LeakSensitiveData() bool

    func (*Logger) Logrus

    func (l *Logger) Logrus() *logrus.Logger

    func (*Logger) NewEntry

    func (l *Logger) NewEntry() *Logger

    func (*Logger) PopLogger

    func (l *Logger) PopLogger(lvl logging.Level, s string, args ...interface{})

    func (*Logger) UseConfig

    func (l *Logger) UseConfig(c configurator)

    func (*Logger) WithContext

    func (l *Logger) WithContext(ctx context.Context) *Logger

    func (*Logger) WithError

    func (l *Logger) WithError(err error) *Logger

    func (*Logger) WithField

    func (l *Logger) WithField(key string, value interface{}) *Logger

    func (*Logger) WithFields

    func (l *Logger) WithFields(f logrus.Fields) *Logger

    func (*Logger) WithRequest

    func (l *Logger) WithRequest(r *http.Request) *Logger

    func (*Logger) WithSensitiveField

    func (l *Logger) WithSensitiveField(key string, value interface{}) *Logger

    type Option

    type Option func(*options)

    func ForceFormat

    func ForceFormat(format string) Option

    func ForceFormatter

    func ForceFormatter(formatter logrus.Formatter) Option

    func ForceLevel

    func ForceLevel(level logrus.Level) Option

    func LeakSensitive

    func LeakSensitive() Option

    func ReportCaller

    func ReportCaller(reportCaller bool) Option

    func UseLogger

    func UseLogger(l *logrus.Logger) Option

    func WithConfigurator

    func WithConfigurator(c configurator) Option

    func WithExitFunc

    func WithExitFunc(exitFunc func(int)) Option

    func WithHook

    func WithHook(hook logrus.Hook) Option