Versions in this module Expand all Collapse all v1 v1.10.17 Oct 18, 2021 Changes in this version + const Keeper + func InitColor(c bool) + func InitLogger(newLogger Logger) + func NewOCRWrapper(l Logger, trace bool, saveError func(string)) ocrtypes.Logger + type Config interface + JSONConsole func() bool + LogLevel func() zapcore.Level + LogToDisk func() bool + RootDir func() string + type GormWrapper struct + func NewGormWrapper(logger Logger, logAllQueries bool, slowThreshold time.Duration) *GormWrapper + func (o *GormWrapper) Error(ctx context.Context, s string, i ...interface{}) + func (o *GormWrapper) Info(ctx context.Context, s string, i ...interface{}) + func (o *GormWrapper) LogAllQueries(b bool) + func (o *GormWrapper) LogMode(level gormlogger.LogLevel) gormlogger.Interface + func (o *GormWrapper) Trace(ctx context.Context, begin time.Time, fc func() (string, int64), err error) + func (o *GormWrapper) Warn(ctx context.Context, s string, i ...interface{}) type Logger + var NullLogger Logger + func NewNullLogger() Logger + func ProductionLogger(c Config) Logger + func TestLogger(t T) Logger + Debug func(args ...interface{}) + Debugf func(format string, values ...interface{}) + Debugw func(msg string, keysAndValues ...interface{}) + Error func(args ...interface{}) + Errorf func(format string, values ...interface{}) + Errorw func(msg string, keysAndValues ...interface{}) + Fatal func(args ...interface{}) + Fatalf func(format string, values ...interface{}) + Fatalw func(msg string, keysAndValues ...interface{}) + Info func(args ...interface{}) + Infof func(format string, values ...interface{}) + Infow func(msg string, keysAndValues ...interface{}) + Named func(name string) Logger + NewRootLogger func(lvl zapcore.Level) (Logger, error) + Panic func(args ...interface{}) + Panicw func(msg string, keysAndValues ...interface{}) + SetLogLevel func(zapcore.Level) + Sync func() error + Warn func(args ...interface{}) + Warnf func(format string, values ...interface{}) + Warnw func(msg string, keysAndValues ...interface{}) + With func(args ...interface{}) Logger type MemorySink + func (s *MemorySink) Reset() + type T interface + Fatal func(...interface{}) + Name func() string v1.10.16 Oct 18, 2021 Changes in this version + var FluxMonitor = "fluxmonitor" + var HeadTracker = "head_tracker" + func ErrorIfCalling(f func() error, optionalMsg ...string) + func Fatalw(msg string, keysAndValues ...interface{}) + func GetLogServices() []string + func NewErrorw(msg string, keysAndValues ...interface{}) error + func NewORM(db *gorm.DB) *orm + func NewProductionConfig(lvl zapcore.Level, dir string, jsonConsole, toDisk bool) (c zap.Config) + func NewProductionEncoderConfig() zapcore.EncoderConfig + func Trace(args ...interface{}) + func Tracef(format string, values ...interface{}) + func Tracew(msg string, keysAndValues ...interface{}) + type LogConfig struct + CreatedAt time.Time + ID int64 + LogLevel string + ServiceName string + UpdatedAt time.Time type Logger + Orm ORM + var Default *Logger + func CreateLogger(zl *zap.SugaredLogger) *Logger + func CreateLoggerWithConfig(zl *zap.SugaredLogger, lvl zapcore.Level, dir string, jsonConsole bool, ...) *Logger + func CreateMemoryTestLogger(lvl zapcore.Level) *Logger + func (l *Logger) ErrorIf(err error, optionalMsg ...string) + func (l *Logger) ErrorIfCalling(f func() error, optionalMsg ...string) + func (l *Logger) GetServiceLogLevels() (map[string]string, error) + func (l *Logger) InitServiceLevelLogger(serviceName string, logLevel string) (*Logger, error) + func (l *Logger) PanicIf(err error) + func (l *Logger) ServiceLogLevel(serviceName string) (string, error) + func (l *Logger) SetDB(db *gorm.DB) + func (l *Logger) WarnIf(err error) + type MemorySink struct + func MemoryLogTestingOnly() *MemorySink + func (s *MemorySink) Close() error + func (s *MemorySink) String() string + func (s *MemorySink) Sync() error + func (s *MemorySink) Write(p []byte) (n int, err error) + type ORM interface + GetServiceLogLevel func(serviceName string) (string, error) + SetServiceLogLevel func(ctx context.Context, serviceName string, level zapcore.Level) error v0 v0.6.4 Jul 24, 2019 v0.6.3 Jul 9, 2019 v0.6.2 Jun 27, 2019 v0.6.1 Jun 26, 2019 v0.6.0 Jun 25, 2019 Changes in this version + func CreateProductionLogger(dir string, jsonConsole bool, lvl zapcore.Level, toDisk bool) *zap.Logger + func CreateTestLogger() *zap.Logger + func Debug(args ...interface{}) + func Debugf(format string, values ...interface{}) + func Debugw(msg string, keysAndValues ...interface{}) + func Error(args ...interface{}) + func ErrorIf(err error) + func Errorf(format string, values ...interface{}) + func Errorw(msg string, keysAndValues ...interface{}) + func Fatal(args ...interface{}) + func Fatalf(format string, values ...interface{}) + func Info(args ...interface{}) + func Infof(format string, values ...interface{}) + func Infow(msg string, keysAndValues ...interface{}) + func Panic(args ...interface{}) + func PanicIf(err error) + func Panicf(format string, values ...interface{}) + func SetLogger(zl *zap.Logger) + func Sync() error + func Warn(args ...interface{}) + func WarnIf(err error) + func Warnf(format string, values ...interface{}) + func Warnw(msg string, keysAndValues ...interface{}) + type Logger struct + func GetLogger() *Logger + func (l *Logger) Write(b []byte) (int, error) + type PrettyConsole struct + func (pc PrettyConsole) Write(b []byte) (int, error)