Documentation ¶
Index ¶
- func SetLevel(level zapcore.Level)
- func StrBuilder(args ...string) string
- type CronLogger
- type Logger
- func (s *Logger) Core() zapcore.Core
- func (s *Logger) CronLogger() *CronLogger
- func (s *Logger) DPanic(args ...interface{})
- func (s *Logger) Debug(args ...interface{})
- func (s *Logger) Debugf(template string, args ...interface{})
- func (s *Logger) Error(args ...interface{})
- func (s *Logger) Errorf(template string, args ...interface{})
- func (s *Logger) Fatal(args ...interface{})
- func (s *Logger) Fatalf(template string, args ...interface{})
- func (s *Logger) Info(args ...interface{})
- func (s *Logger) Infof(template string, args ...interface{})
- func (s *Logger) Named(str string) *zap.Logger
- func (s *Logger) Panic(args ...interface{})
- func (s *Logger) Panicf(template string, args ...interface{})
- func (s *Logger) PgxLogger() *PgxLogger
- func (s *Logger) Print(args ...interface{})
- func (s *Logger) Printf(format string, args ...interface{})
- func (s *Logger) Println(v ...interface{})
- func (s *Logger) Sentinel() *Sentinel
- func (s *Logger) SetLevel(level zapcore.Level)
- func (s *Logger) Sync()
- func (s *Logger) Warn(args ...interface{})
- func (s *Logger) Warnf(template string, args ...interface{})
- func (s *Logger) Warning(args ...interface{})
- func (s *Logger) Warningf(template string, args ...interface{})
- func (s *Logger) With(k string, v interface{}) *ZapLogger
- func (s *Logger) WithField(k string, v interface{}) *ZapLogger
- func (s *Logger) WithFields(fields map[string]interface{}) *ZapLogger
- func (s *Logger) WithOptions(opts ...Option) *Logger
- type MyLogger
- type Option
- type PgxLogger
- type PrintfLogger
- type Sentinel
- func (s *Sentinel) Debug(msg string, args ...interface{})
- func (s *Sentinel) DebugEnabled() bool
- func (s *Sentinel) Error(err error, msg string, args ...interface{})
- func (s *Sentinel) ErrorEnabled() bool
- func (s *Sentinel) Info(msg string, args ...interface{})
- func (s *Sentinel) InfoEnabled() bool
- func (s *Sentinel) Warn(msg string, args ...interface{})
- func (s *Sentinel) WarnEnabled() bool
- type ZapLogger
- type ZapLoggerOption
- func WithCaller() ZapLoggerOption
- func WithDays(days int64) ZapLoggerOption
- func WithDebug() ZapLoggerOption
- func WithLevel(level zapcore.Level) ZapLoggerOption
- func WithPath(path string) ZapLoggerOption
- func WithPrefix(prefix string) ZapLoggerOption
- func WithSamplingCore() ZapLoggerOption
- func WithStoreInDay() ZapLoggerOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CronLogger ¶ added in v1.2.8
type CronLogger struct {
// contains filtered or unexported fields
}
type Logger interface { // Info logs routine messages about cron's operation. Info(msg string, keysAndValues ...interface{}) // Error logs an error condition. Error(err error, msg string, keysAndValues ...interface{}) }
func (*CronLogger) Error ¶ added in v1.2.8
func (c *CronLogger) Error(err error, msg string, keysAndValues ...interface{})
func (*CronLogger) Info ¶ added in v1.2.8
func (c *CronLogger) Info(msg string, keysAndValues ...interface{})
type Logger ¶
Logger zap adapter log
func (*Logger) CronLogger ¶ added in v1.2.8
func (s *Logger) CronLogger() *CronLogger
func (*Logger) DPanic ¶ added in v1.3.0
func (s *Logger) DPanic(args ...interface{})
DPanic logs a message at level Painc on the ZapLogger.
func (*Logger) Debug ¶ added in v1.3.0
func (s *Logger) Debug(args ...interface{})
Debug logs a message at level DebugMode on the ZapLogger.
func (*Logger) Error ¶ added in v1.3.0
func (s *Logger) Error(args ...interface{})
Error logs a message at level Error on the ZapLogger.
func (*Logger) Fatal ¶ added in v1.3.0
func (s *Logger) Fatal(args ...interface{})
Fatal logs a message at level Fatal on the ZapLogger.
func (*Logger) Info ¶ added in v1.3.0
func (s *Logger) Info(args ...interface{})
Info logs a message at level Info on the ZapLogger.
func (*Logger) Panic ¶ added in v1.3.0
func (s *Logger) Panic(args ...interface{})
Panic logs a message at level Painc on the ZapLogger.
func (*Logger) Print ¶ added in v1.3.0
func (s *Logger) Print(args ...interface{})
Print logs a message at level Info on the ZapLogger.
func (*Logger) Println ¶ added in v1.3.0
func (s *Logger) Println(v ...interface{})
Println logs a message at level Info on the ZapLogger.
func (*Logger) Warn ¶ added in v1.3.0
func (s *Logger) Warn(args ...interface{})
Warn logs a message at level Warn on the ZapLogger.
func (*Logger) Warning ¶ added in v1.3.0
func (s *Logger) Warning(args ...interface{})
Warning logs a message at level Warn on the ZapLogger.
func (*Logger) WithFields ¶ added in v1.3.0
WithFields return a log with extra fields.
func (*Logger) WithOptions ¶
WithOptions clones the current Logger, applies the supplied Options, and returns the resulting Logger. It's safe to use concurrently.
type MyLogger ¶
type MyLogger interface { Fatalf(string, ...interface{}) Debugf(string, ...interface{}) Errorf(string, ...interface{}) Infof(string, ...interface{}) Warnf(string, ...interface{}) Debug(...interface{}) Warn(...interface{}) Info(...interface{}) Fatal(...interface{}) }
MyLogger interface
type Option ¶
type Option interface {
// contains filtered or unexported methods
}
An Option configures a Logger.
type PgxLogger ¶ added in v1.2.10
type PgxLogger struct {
// contains filtered or unexported fields
}
func NewPgxLogger ¶ added in v1.2.10
NewPgxLogger creates a new PgxLogger.
type PrintfLogger ¶
type PrintfLogger interface {
Printf(format string, args ...interface{})
}
PrintfLogger for fasthttp log interface
type Sentinel ¶ added in v1.3.1
type Sentinel struct {
// contains filtered or unexported fields
}
func (*Sentinel) DebugEnabled ¶ added in v1.3.1
func (*Sentinel) ErrorEnabled ¶ added in v1.3.1
func (*Sentinel) InfoEnabled ¶ added in v1.3.1
func (*Sentinel) WarnEnabled ¶ added in v1.3.1
type ZapLoggerOption ¶
type ZapLoggerOption func(*ZapLogger)
ZapLoggerOption options
func WithSamplingCore ¶ added in v1.3.4
func WithSamplingCore() ZapLoggerOption
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
cmd
|
|
Package diode provides a thread-safe, lock-free, non-blocking io.Writer wrapper.
|
Package diode provides a thread-safe, lock-free, non-blocking io.Writer wrapper. |
example
|
|
package rotatelogs is a port of File-RotateLogs from Perl (https://metacpan.org/release/File-RotateLogs), and it allows you to automatically rotate output files when you write to them according to the filename pattern that you can specify.
|
package rotatelogs is a port of File-RotateLogs from Perl (https://metacpan.org/release/File-RotateLogs), and it allows you to automatically rotate output files when you write to them according to the filename pattern that you can specify. |