Documentation
¶
Index ¶
- func BoldEndOptions(opts types.LogProcessOptionsInterface)
- func BoldFailOptions(opts types.LogProcessOptionsInterface)
- func BoldOptions(opts types.LogProcessOptionsInterface)
- func BoldStartOptions(opts types.LogProcessOptionsInterface)
- func InfrastructureOptions(opts types.LogProcessOptionsInterface)
- func InitKlog(logger Logger, opts ...KlogOpt) error
- func NewSLogWithDebug(ctx context.Context, provider LoggerProvider, isDebug bool) *slog.Logger
- func NewSLogWithPrefix(ctx context.Context, provider LoggerProvider, prefix string) *slog.Logger
- func NewSLogWithPrefixAndDebug(ctx context.Context, provider LoggerProvider, prefix string, isDebug bool) *slog.Logger
- type DummyLogger
- func (d *DummyLogger) BufferLogger(buffer *bytes.Buffer) Logger
- func (w DummyLogger) DebugF(format string, a ...any)
- func (d *DummyLogger) DebugFWithoutLn(format string, a ...interface{})
- func (d *DummyLogger) DebugLn(a ...interface{})
- func (w DummyLogger) ErrorF(format string, a ...any)
- func (d *DummyLogger) ErrorFWithoutLn(format string, a ...interface{})
- func (d *DummyLogger) ErrorLn(a ...interface{})
- func (d *DummyLogger) Fail(l string)
- func (d *DummyLogger) FailRetry(l string)
- func (d *DummyLogger) FlushAndClose() error
- func (w DummyLogger) InfoF(format string, a ...any)
- func (d *DummyLogger) InfoFWithoutLn(format string, a ...interface{})
- func (d *DummyLogger) InfoLn(a ...interface{})
- func (d *DummyLogger) JSON(content []byte)
- func (d *DummyLogger) Process(_ Process, t string, run func() error) error
- func (d *DummyLogger) ProcessLogger() ProcessLogger
- func (d *DummyLogger) SilentLogger() *SilentLogger
- func (d *DummyLogger) Success(l string)
- func (w DummyLogger) WarnF(format string, a ...any)
- func (d *DummyLogger) WarnFWithoutLn(format string, a ...interface{})
- func (d *DummyLogger) WarnLn(a ...interface{})
- func (d *DummyLogger) Write(content []byte) (int, error)
- type InMemoryLogger
- func (l *InMemoryLogger) AllMatches(m *Match) ([]string, error)
- func (l *InMemoryLogger) BufferLogger(buffer *bytes.Buffer) Logger
- func (w InMemoryLogger) DebugF(format string, a ...any)
- func (l *InMemoryLogger) DebugFWithoutLn(format string, a ...interface{})
- func (l *InMemoryLogger) DebugLn(a ...interface{})
- func (w InMemoryLogger) ErrorF(format string, a ...any)
- func (l *InMemoryLogger) ErrorFWithoutLn(format string, a ...interface{})
- func (l *InMemoryLogger) ErrorLn(a ...interface{})
- func (l *InMemoryLogger) Fail(s string)
- func (l *InMemoryLogger) FailRetry(s string)
- func (l *InMemoryLogger) FirstMatch(m *Match) (string, error)
- func (l *InMemoryLogger) FlushAndClose() error
- func (w InMemoryLogger) InfoF(format string, a ...any)
- func (l *InMemoryLogger) InfoFWithoutLn(format string, a ...interface{})
- func (l *InMemoryLogger) InfoLn(a ...interface{})
- func (l *InMemoryLogger) JSON(s []byte)
- func (l *InMemoryLogger) Parent() Logger
- func (l *InMemoryLogger) Process(p Process, t string, action func() error) error
- func (l *InMemoryLogger) ProcessEnd()
- func (l *InMemoryLogger) ProcessFail()
- func (l *InMemoryLogger) ProcessLogger() ProcessLogger
- func (l *InMemoryLogger) ProcessStart(name string)
- func (l *InMemoryLogger) SilentLogger() *SilentLogger
- func (l *InMemoryLogger) Success(s string)
- func (w InMemoryLogger) WarnF(format string, a ...any)
- func (l *InMemoryLogger) WarnFWithoutLn(format string, a ...interface{})
- func (l *InMemoryLogger) WarnLn(a ...interface{})
- func (l *InMemoryLogger) WithBuffer(buffer *bytes.Buffer) *InMemoryLogger
- func (l *InMemoryLogger) WithDebugPrefix(prefix string) *InMemoryLogger
- func (l *InMemoryLogger) WithErrorPrefix(prefix string) *InMemoryLogger
- func (l *InMemoryLogger) WithNoDebug(f bool) *InMemoryLogger
- func (l *InMemoryLogger) Write(s []byte) (int, error)
- type KeywordSanitizer
- func (l *KeywordSanitizer) Filter(args []any) []any
- func (l *KeywordSanitizer) FilterF(format string, args []any) (string, []any)
- func (l *KeywordSanitizer) FilterS(msg string, keysAndValues []any) (string, []any)
- func (l *KeywordSanitizer) WithAdditionalKeywords(keywords []string) *KeywordSanitizer
- type KlogOpt
- type KlogOptions
- type Logger
- func NewLogger(loggerType Type, isDebug bool) (Logger, error)
- func NewLoggerWithOptions(loggerType Type, opts LoggerOptions) (Logger, error)
- func ProvideSafe(provider LoggerProvider, defaultLogger Logger) Logger
- func SafeProvideLogger(provider LoggerProvider) Logger
- func WrapWithTeeLogger(logger Logger, writer io.WriteCloser, bufSize int) (Logger, error)
- type LoggerOptions
- type LoggerProvider
- type Match
- type PrettyLogger
- func (d *PrettyLogger) BufferLogger(buffer *bytes.Buffer) Logger
- func (w PrettyLogger) DebugF(format string, a ...any)
- func (d *PrettyLogger) DebugFWithoutLn(format string, a ...interface{})
- func (d *PrettyLogger) DebugLn(a ...interface{})
- func (w PrettyLogger) ErrorF(format string, a ...any)
- func (d *PrettyLogger) ErrorFWithoutLn(format string, a ...interface{})
- func (d *PrettyLogger) ErrorLn(a ...interface{})
- func (d *PrettyLogger) Fail(l string)
- func (d *PrettyLogger) FailRetry(l string)
- func (d *PrettyLogger) FlushAndClose() error
- func (w PrettyLogger) InfoF(format string, a ...any)
- func (d *PrettyLogger) InfoFWithoutLn(format string, a ...interface{})
- func (d *PrettyLogger) InfoLn(a ...interface{})
- func (d *PrettyLogger) JSON(content []byte)
- func (d *PrettyLogger) Process(p Process, t string, run func() error) error
- func (d *PrettyLogger) ProcessLogger() ProcessLogger
- func (d *PrettyLogger) SilentLogger() *SilentLogger
- func (d *PrettyLogger) Success(l string)
- func (w PrettyLogger) WarnF(format string, a ...any)
- func (d *PrettyLogger) WarnFWithoutLn(format string, a ...interface{})
- func (d *PrettyLogger) WarnLn(a ...interface{})
- func (d *PrettyLogger) Write(content []byte) (int, error)
- type Process
- type ProcessLogger
- type Processes
- type SLogHandler
- func (h *SLogHandler) Enabled(_ context.Context, lvl slog.Level) bool
- func (h *SLogHandler) Handle(_ context.Context, record slog.Record) error
- func (h *SLogHandler) WithAttrs(attrs []slog.Attr) slog.Handler
- func (h *SLogHandler) WithDebug(d bool) *SLogHandler
- func (h *SLogHandler) WithGroup(name string) slog.Handler
- func (h *SLogHandler) WithPrefix(p string) *SLogHandler
- type Sanitizer
- type SilentLogger
- func (d *SilentLogger) BufferLogger(buffer *bytes.Buffer) Logger
- func (w SilentLogger) DebugF(format string, a ...any)
- func (d *SilentLogger) DebugFWithoutLn(format string, a ...interface{})
- func (d *SilentLogger) DebugLn(a ...interface{})
- func (w SilentLogger) ErrorF(format string, a ...any)
- func (d *SilentLogger) ErrorFWithoutLn(format string, a ...interface{})
- func (d *SilentLogger) ErrorLn(a ...interface{})
- func (d *SilentLogger) Fail(l string)
- func (d *SilentLogger) FailRetry(l string)
- func (d *SilentLogger) FlushAndClose() error
- func (w SilentLogger) InfoF(format string, a ...any)
- func (d *SilentLogger) InfoFWithoutLn(format string, a ...interface{})
- func (d *SilentLogger) InfoLn(a ...interface{})
- func (d *SilentLogger) JSON(content []byte)
- func (d *SilentLogger) Process(_ Process, t string, run func() error) error
- func (d *SilentLogger) ProcessLogger() ProcessLogger
- func (d *SilentLogger) SilentLogger() *SilentLogger
- func (d *SilentLogger) Success(l string)
- func (w SilentLogger) WarnF(format string, a ...any)
- func (d *SilentLogger) WarnFWithoutLn(format string, a ...interface{})
- func (d *SilentLogger) WarnLn(a ...interface{})
- func (d *SilentLogger) Write(content []byte) (int, error)
- type SimpleLogger
- func (d *SimpleLogger) BufferLogger(buffer *bytes.Buffer) Logger
- func (w SimpleLogger) DebugF(format string, a ...any)
- func (d *SimpleLogger) DebugFWithoutLn(format string, a ...interface{})
- func (d *SimpleLogger) DebugLn(a ...interface{})
- func (w SimpleLogger) ErrorF(format string, a ...any)
- func (d *SimpleLogger) ErrorFWithoutLn(format string, a ...interface{})
- func (d *SimpleLogger) ErrorLn(a ...interface{})
- func (d *SimpleLogger) Fail(l string)
- func (d *SimpleLogger) FailRetry(l string)
- func (d *SimpleLogger) FlushAndClose() error
- func (w SimpleLogger) InfoF(format string, a ...any)
- func (d *SimpleLogger) InfoFWithoutLn(format string, a ...interface{})
- func (d *SimpleLogger) InfoLn(a ...interface{})
- func (d *SimpleLogger) JSON(content []byte)
- func (d *SimpleLogger) Process(p Process, t string, run func() error) error
- func (d *SimpleLogger) ProcessLogger() ProcessLogger
- func (d *SimpleLogger) SilentLogger() *SilentLogger
- func (d *SimpleLogger) Success(l string)
- func (w SimpleLogger) WarnF(format string, a ...any)
- func (d *SimpleLogger) WarnFWithoutLn(format string, a ...interface{})
- func (d *SimpleLogger) WarnLn(a ...interface{})
- func (d *SimpleLogger) Write(content []byte) (int, error)
- type StyleEntry
- type StyleEntryOptionsSetter
- type TeeLogger
- func (d *TeeLogger) BufferLogger(buffer *bytes.Buffer) Logger
- func (w TeeLogger) DebugF(format string, a ...any)
- func (d *TeeLogger) DebugFWithoutLn(format string, a ...interface{})
- func (d *TeeLogger) DebugLn(a ...interface{})
- func (w TeeLogger) ErrorF(format string, a ...any)
- func (d *TeeLogger) ErrorFWithoutLn(format string, a ...interface{})
- func (d *TeeLogger) ErrorLn(a ...interface{})
- func (d *TeeLogger) Fail(l string)
- func (d *TeeLogger) FailRetry(l string)
- func (d *TeeLogger) FlushAndClose() error
- func (w TeeLogger) InfoF(format string, a ...any)
- func (d *TeeLogger) InfoFWithoutLn(format string, a ...interface{})
- func (d *TeeLogger) InfoLn(a ...interface{})
- func (d *TeeLogger) JSON(content []byte)
- func (d *TeeLogger) Process(p Process, t string, run func() error) error
- func (d *TeeLogger) ProcessLogger() ProcessLogger
- func (d *TeeLogger) SilentLogger() *SilentLogger
- func (d *TeeLogger) Success(l string)
- func (w TeeLogger) WarnF(format string, a ...any)
- func (d *TeeLogger) WarnFWithoutLn(format string, a ...interface{})
- func (d *TeeLogger) WarnLn(a ...interface{})
- func (d *TeeLogger) Write(content []byte) (int, error)
- type Type
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BoldEndOptions ¶
func BoldEndOptions(opts types.LogProcessOptionsInterface)
func BoldFailOptions ¶
func BoldFailOptions(opts types.LogProcessOptionsInterface)
func BoldOptions ¶
func BoldOptions(opts types.LogProcessOptionsInterface)
func BoldStartOptions ¶
func BoldStartOptions(opts types.LogProcessOptionsInterface)
func InfrastructureOptions ¶
func InfrastructureOptions(opts types.LogProcessOptionsInterface)
func NewSLogWithDebug ¶ added in v0.5.0
func NewSLogWithPrefix ¶ added in v0.5.0
func NewSLogWithPrefixAndDebug ¶ added in v0.5.0
Types ¶
type DummyLogger ¶
type DummyLogger struct {
// contains filtered or unexported fields
}
func NewDummyLogger ¶
func NewDummyLogger(isDebug bool) *DummyLogger
func (*DummyLogger) BufferLogger ¶
func (d *DummyLogger) BufferLogger(buffer *bytes.Buffer) Logger
func (*DummyLogger) DebugFWithoutLn ¶ added in v0.5.0
func (d *DummyLogger) DebugFWithoutLn(format string, a ...interface{})
func (*DummyLogger) DebugLn ¶
func (d *DummyLogger) DebugLn(a ...interface{})
DebugLn Deprecated: Use DebugF(string) it add \n to end
func (*DummyLogger) ErrorFWithoutLn ¶ added in v0.5.0
func (d *DummyLogger) ErrorFWithoutLn(format string, a ...interface{})
func (*DummyLogger) ErrorLn ¶
func (d *DummyLogger) ErrorLn(a ...interface{})
ErrorLn Deprecated: Use ErrorF(string) it add \n to end
func (*DummyLogger) Fail ¶
func (d *DummyLogger) Fail(l string)
func (*DummyLogger) FailRetry ¶
func (d *DummyLogger) FailRetry(l string)
func (*DummyLogger) FlushAndClose ¶
func (d *DummyLogger) FlushAndClose() error
func (*DummyLogger) InfoFWithoutLn ¶ added in v0.5.0
func (d *DummyLogger) InfoFWithoutLn(format string, a ...interface{})
func (*DummyLogger) InfoLn ¶
func (d *DummyLogger) InfoLn(a ...interface{})
InfoLn Deprecated: Use InfoF(string) it add \n to end
func (*DummyLogger) JSON ¶
func (d *DummyLogger) JSON(content []byte)
func (*DummyLogger) Process ¶
func (d *DummyLogger) Process(_ Process, t string, run func() error) error
func (*DummyLogger) ProcessLogger ¶
func (d *DummyLogger) ProcessLogger() ProcessLogger
func (*DummyLogger) SilentLogger ¶
func (d *DummyLogger) SilentLogger() *SilentLogger
func (*DummyLogger) Success ¶
func (d *DummyLogger) Success(l string)
func (*DummyLogger) WarnFWithoutLn ¶ added in v0.5.0
func (d *DummyLogger) WarnFWithoutLn(format string, a ...interface{})
func (*DummyLogger) WarnLn ¶
func (d *DummyLogger) WarnLn(a ...interface{})
WarnLn Deprecated: Use WarnF(string) it add \n to end
type InMemoryLogger ¶
type InMemoryLogger struct {
// contains filtered or unexported fields
}
func NewInMemoryLogger ¶
func NewInMemoryLogger() *InMemoryLogger
func NewInMemoryLoggerWithParent ¶
func NewInMemoryLoggerWithParent(parent Logger) *InMemoryLogger
func (*InMemoryLogger) AllMatches ¶
func (l *InMemoryLogger) AllMatches(m *Match) ([]string, error)
func (*InMemoryLogger) BufferLogger ¶
func (l *InMemoryLogger) BufferLogger(buffer *bytes.Buffer) Logger
func (*InMemoryLogger) DebugFWithoutLn ¶ added in v0.5.0
func (l *InMemoryLogger) DebugFWithoutLn(format string, a ...interface{})
func (*InMemoryLogger) DebugLn ¶
func (l *InMemoryLogger) DebugLn(a ...interface{})
DebugLn Deprecated: Use DebugF(string) it add \n to end
func (*InMemoryLogger) ErrorFWithoutLn ¶ added in v0.5.0
func (l *InMemoryLogger) ErrorFWithoutLn(format string, a ...interface{})
func (*InMemoryLogger) ErrorLn ¶
func (l *InMemoryLogger) ErrorLn(a ...interface{})
ErrorLn Deprecated: Use ErrorF(string) it add \n to end
func (*InMemoryLogger) Fail ¶
func (l *InMemoryLogger) Fail(s string)
func (*InMemoryLogger) FailRetry ¶
func (l *InMemoryLogger) FailRetry(s string)
func (*InMemoryLogger) FirstMatch ¶
func (l *InMemoryLogger) FirstMatch(m *Match) (string, error)
func (*InMemoryLogger) FlushAndClose ¶
func (l *InMemoryLogger) FlushAndClose() error
func (*InMemoryLogger) InfoFWithoutLn ¶ added in v0.5.0
func (l *InMemoryLogger) InfoFWithoutLn(format string, a ...interface{})
func (*InMemoryLogger) InfoLn ¶
func (l *InMemoryLogger) InfoLn(a ...interface{})
InfoLn Deprecated: Use InfoF(string) it add \n to end
func (*InMemoryLogger) JSON ¶
func (l *InMemoryLogger) JSON(s []byte)
func (*InMemoryLogger) Parent ¶
func (l *InMemoryLogger) Parent() Logger
func (*InMemoryLogger) Process ¶
func (l *InMemoryLogger) Process(p Process, t string, action func() error) error
func (*InMemoryLogger) ProcessEnd ¶
func (l *InMemoryLogger) ProcessEnd()
func (*InMemoryLogger) ProcessFail ¶
func (l *InMemoryLogger) ProcessFail()
func (*InMemoryLogger) ProcessLogger ¶
func (l *InMemoryLogger) ProcessLogger() ProcessLogger
func (*InMemoryLogger) ProcessStart ¶
func (l *InMemoryLogger) ProcessStart(name string)
func (*InMemoryLogger) SilentLogger ¶
func (l *InMemoryLogger) SilentLogger() *SilentLogger
func (*InMemoryLogger) Success ¶
func (l *InMemoryLogger) Success(s string)
func (*InMemoryLogger) WarnFWithoutLn ¶ added in v0.5.0
func (l *InMemoryLogger) WarnFWithoutLn(format string, a ...interface{})
func (*InMemoryLogger) WarnLn ¶
func (l *InMemoryLogger) WarnLn(a ...interface{})
WarnLn Deprecated: Use WarnF(string) it add \n to end
func (*InMemoryLogger) WithBuffer ¶
func (l *InMemoryLogger) WithBuffer(buffer *bytes.Buffer) *InMemoryLogger
func (*InMemoryLogger) WithDebugPrefix ¶
func (l *InMemoryLogger) WithDebugPrefix(prefix string) *InMemoryLogger
func (*InMemoryLogger) WithErrorPrefix ¶
func (l *InMemoryLogger) WithErrorPrefix(prefix string) *InMemoryLogger
func (*InMemoryLogger) WithNoDebug ¶
func (l *InMemoryLogger) WithNoDebug(f bool) *InMemoryLogger
type KeywordSanitizer ¶
type KeywordSanitizer struct {
// contains filtered or unexported fields
}
func NewKeywordSanitizer ¶
func NewKeywordSanitizer() *KeywordSanitizer
func (*KeywordSanitizer) Filter ¶
func (l *KeywordSanitizer) Filter(args []any) []any
func (*KeywordSanitizer) FilterF ¶
func (l *KeywordSanitizer) FilterF(format string, args []any) (string, []any)
func (*KeywordSanitizer) FilterS ¶
func (l *KeywordSanitizer) FilterS(msg string, keysAndValues []any) (string, []any)
func (*KeywordSanitizer) WithAdditionalKeywords ¶
func (l *KeywordSanitizer) WithAdditionalKeywords(keywords []string) *KeywordSanitizer
type KlogOptions ¶
type KlogOptions struct {
// contains filtered or unexported fields
}
type Logger ¶
type Logger interface {
// contains filtered or unexported methods
}
func NewLoggerWithOptions ¶
func NewLoggerWithOptions(loggerType Type, opts LoggerOptions) (Logger, error)
NewLoggerWithOptions do not init Klog use InitKlog for initialize Klog wrapper
func ProvideSafe ¶ added in v0.3.0
func ProvideSafe(provider LoggerProvider, defaultLogger Logger) Logger
func SafeProvideLogger ¶
func SafeProvideLogger(provider LoggerProvider) Logger
func WrapWithTeeLogger ¶
type LoggerOptions ¶
type LoggerProvider ¶
type LoggerProvider func() Logger
func SilentLoggerProvider ¶
func SilentLoggerProvider() LoggerProvider
func SimpleLoggerProvider ¶
func SimpleLoggerProvider(logger Logger) LoggerProvider
type PrettyLogger ¶
type PrettyLogger struct {
// contains filtered or unexported fields
}
func NewPrettyLogger ¶
func NewPrettyLogger(opts LoggerOptions) *PrettyLogger
func (*PrettyLogger) BufferLogger ¶
func (d *PrettyLogger) BufferLogger(buffer *bytes.Buffer) Logger
func (*PrettyLogger) DebugFWithoutLn ¶ added in v0.5.0
func (d *PrettyLogger) DebugFWithoutLn(format string, a ...interface{})
func (*PrettyLogger) DebugLn ¶
func (d *PrettyLogger) DebugLn(a ...interface{})
DebugLn Deprecated: Use DebugF(string) it add \n to end
func (*PrettyLogger) ErrorFWithoutLn ¶ added in v0.5.0
func (d *PrettyLogger) ErrorFWithoutLn(format string, a ...interface{})
func (*PrettyLogger) ErrorLn ¶
func (d *PrettyLogger) ErrorLn(a ...interface{})
ErrorLn Deprecated: Use ErrorF(string) it add \n to end
func (*PrettyLogger) Fail ¶
func (d *PrettyLogger) Fail(l string)
func (*PrettyLogger) FailRetry ¶
func (d *PrettyLogger) FailRetry(l string)
func (*PrettyLogger) FlushAndClose ¶
func (d *PrettyLogger) FlushAndClose() error
func (*PrettyLogger) InfoFWithoutLn ¶ added in v0.5.0
func (d *PrettyLogger) InfoFWithoutLn(format string, a ...interface{})
func (*PrettyLogger) InfoLn ¶
func (d *PrettyLogger) InfoLn(a ...interface{})
InfoLn Deprecated: Use InfoF(string) it add \n to end
func (*PrettyLogger) JSON ¶
func (d *PrettyLogger) JSON(content []byte)
func (*PrettyLogger) Process ¶
func (d *PrettyLogger) Process(p Process, t string, run func() error) error
func (*PrettyLogger) ProcessLogger ¶
func (d *PrettyLogger) ProcessLogger() ProcessLogger
func (*PrettyLogger) SilentLogger ¶
func (d *PrettyLogger) SilentLogger() *SilentLogger
func (*PrettyLogger) Success ¶
func (d *PrettyLogger) Success(l string)
func (*PrettyLogger) WarnFWithoutLn ¶ added in v0.5.0
func (d *PrettyLogger) WarnFWithoutLn(format string, a ...interface{})
func (*PrettyLogger) WarnLn ¶
func (d *PrettyLogger) WarnLn(a ...interface{})
WarnLn Deprecated: Use WarnF(string) it add \n to end
type ProcessLogger ¶
type ProcessLogger interface {
ProcessStart(name string)
ProcessFail()
ProcessEnd()
}
type Processes ¶
type Processes map[Process]StyleEntry
func AdditionalProcesses ¶
func AdditionalProcesses(processes map[string]StyleEntry) Processes
type SLogHandler ¶ added in v0.5.0
type SLogHandler struct {
// contains filtered or unexported fields
}
func NewSLogHandler ¶ added in v0.5.0
func NewSLogHandler(provider LoggerProvider) *SLogHandler
func NewSLogHandlerWithPrefix ¶ added in v0.5.0
func NewSLogHandlerWithPrefix(provider LoggerProvider, prefix string) *SLogHandler
func (*SLogHandler) WithAttrs ¶ added in v0.5.0
func (h *SLogHandler) WithAttrs(attrs []slog.Attr) slog.Handler
func (*SLogHandler) WithDebug ¶ added in v0.5.0
func (h *SLogHandler) WithDebug(d bool) *SLogHandler
func (*SLogHandler) WithGroup ¶ added in v0.5.0
func (h *SLogHandler) WithGroup(name string) slog.Handler
func (*SLogHandler) WithPrefix ¶ added in v0.5.0
func (h *SLogHandler) WithPrefix(p string) *SLogHandler
type Sanitizer ¶
func NewDummySanitizer ¶
func NewDummySanitizer() Sanitizer
type SilentLogger ¶
type SilentLogger struct {
// contains filtered or unexported fields
}
func NewSilentLogger ¶
func NewSilentLogger() *SilentLogger
func (*SilentLogger) BufferLogger ¶
func (d *SilentLogger) BufferLogger(buffer *bytes.Buffer) Logger
func (*SilentLogger) DebugFWithoutLn ¶ added in v0.5.0
func (d *SilentLogger) DebugFWithoutLn(format string, a ...interface{})
func (*SilentLogger) DebugLn ¶
func (d *SilentLogger) DebugLn(a ...interface{})
DebugLn Deprecated: Use DebugF(string) it add \n to end
func (*SilentLogger) ErrorFWithoutLn ¶ added in v0.5.0
func (d *SilentLogger) ErrorFWithoutLn(format string, a ...interface{})
func (*SilentLogger) ErrorLn ¶
func (d *SilentLogger) ErrorLn(a ...interface{})
ErrorLn Deprecated: Use ErrorF(string) it add \n to end
func (*SilentLogger) Fail ¶
func (d *SilentLogger) Fail(l string)
func (*SilentLogger) FailRetry ¶
func (d *SilentLogger) FailRetry(l string)
func (*SilentLogger) FlushAndClose ¶
func (d *SilentLogger) FlushAndClose() error
func (*SilentLogger) InfoFWithoutLn ¶ added in v0.5.0
func (d *SilentLogger) InfoFWithoutLn(format string, a ...interface{})
func (*SilentLogger) InfoLn ¶
func (d *SilentLogger) InfoLn(a ...interface{})
InfoLn Deprecated: Use InfoF(string) it add \n to end
func (*SilentLogger) JSON ¶
func (d *SilentLogger) JSON(content []byte)
func (*SilentLogger) Process ¶
func (d *SilentLogger) Process(_ Process, t string, run func() error) error
func (*SilentLogger) ProcessLogger ¶
func (d *SilentLogger) ProcessLogger() ProcessLogger
func (*SilentLogger) SilentLogger ¶
func (d *SilentLogger) SilentLogger() *SilentLogger
func (*SilentLogger) Success ¶
func (d *SilentLogger) Success(l string)
func (*SilentLogger) WarnFWithoutLn ¶ added in v0.5.0
func (d *SilentLogger) WarnFWithoutLn(format string, a ...interface{})
func (*SilentLogger) WarnLn ¶
func (d *SilentLogger) WarnLn(a ...interface{})
WarnLn Deprecated: Use WarnF(string) it add \n to end
type SimpleLogger ¶
type SimpleLogger struct {
// contains filtered or unexported fields
}
func NewJSONLogger ¶
func NewJSONLogger(opts LoggerOptions) *SimpleLogger
func NewSimpleLogger ¶
func NewSimpleLogger(opts LoggerOptions) *SimpleLogger
func (*SimpleLogger) BufferLogger ¶
func (d *SimpleLogger) BufferLogger(buffer *bytes.Buffer) Logger
func (*SimpleLogger) DebugFWithoutLn ¶ added in v0.5.0
func (d *SimpleLogger) DebugFWithoutLn(format string, a ...interface{})
func (*SimpleLogger) DebugLn ¶
func (d *SimpleLogger) DebugLn(a ...interface{})
DebugLn Deprecated: Use DebugF(string) it add \n to end
func (*SimpleLogger) ErrorFWithoutLn ¶ added in v0.5.0
func (d *SimpleLogger) ErrorFWithoutLn(format string, a ...interface{})
func (*SimpleLogger) ErrorLn ¶
func (d *SimpleLogger) ErrorLn(a ...interface{})
ErrorLn Deprecated: Use ErrorF(string) it add \n to end
func (*SimpleLogger) Fail ¶
func (d *SimpleLogger) Fail(l string)
func (*SimpleLogger) FailRetry ¶
func (d *SimpleLogger) FailRetry(l string)
func (*SimpleLogger) FlushAndClose ¶
func (d *SimpleLogger) FlushAndClose() error
func (*SimpleLogger) InfoFWithoutLn ¶ added in v0.5.0
func (d *SimpleLogger) InfoFWithoutLn(format string, a ...interface{})
func (*SimpleLogger) InfoLn ¶
func (d *SimpleLogger) InfoLn(a ...interface{})
InfoLn Deprecated: Use InfoF(string) it add \n to end
func (*SimpleLogger) JSON ¶
func (d *SimpleLogger) JSON(content []byte)
func (*SimpleLogger) Process ¶
func (d *SimpleLogger) Process(p Process, t string, run func() error) error
func (*SimpleLogger) ProcessLogger ¶
func (d *SimpleLogger) ProcessLogger() ProcessLogger
func (*SimpleLogger) SilentLogger ¶
func (d *SimpleLogger) SilentLogger() *SilentLogger
func (*SimpleLogger) Success ¶
func (d *SimpleLogger) Success(l string)
func (*SimpleLogger) WarnFWithoutLn ¶ added in v0.5.0
func (d *SimpleLogger) WarnFWithoutLn(format string, a ...interface{})
func (*SimpleLogger) WarnLn ¶
func (d *SimpleLogger) WarnLn(a ...interface{})
WarnLn Deprecated: Use WarnF(string) it add \n to end
type StyleEntry ¶
type StyleEntry struct {
Title string
OptionsSetter StyleEntryOptionsSetter
}
type StyleEntryOptionsSetter ¶
type StyleEntryOptionsSetter func(opts types.LogProcessOptionsInterface)
type TeeLogger ¶
type TeeLogger struct {
// contains filtered or unexported fields
}
func NewTeeLogger ¶
func (*TeeLogger) DebugFWithoutLn ¶ added in v0.5.0
func (*TeeLogger) DebugLn ¶
func (d *TeeLogger) DebugLn(a ...interface{})
DebugLn Deprecated: Use DebugF(string) it add \n to end
func (*TeeLogger) ErrorFWithoutLn ¶ added in v0.5.0
func (*TeeLogger) ErrorLn ¶
func (d *TeeLogger) ErrorLn(a ...interface{})
ErrorLn Deprecated: Use ErrorF(string) it add \n to end
func (*TeeLogger) FlushAndClose ¶
func (*TeeLogger) InfoFWithoutLn ¶ added in v0.5.0
func (*TeeLogger) InfoLn ¶
func (d *TeeLogger) InfoLn(a ...interface{})
InfoLn Deprecated: Use InfoF(string) it add \n to end
func (*TeeLogger) ProcessLogger ¶
func (d *TeeLogger) ProcessLogger() ProcessLogger
func (*TeeLogger) SilentLogger ¶
func (d *TeeLogger) SilentLogger() *SilentLogger