config

package
v0.5.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 31, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CBLogZapLogger

type CBLogZapLogger struct {
	Logger *zap.SugaredLogger
}

func (*CBLogZapLogger) Log

func (c *CBLogZapLogger) Log(level log.Level, format string, args ...interface{})

type Config

type Config struct {
	CouchbaseHost           string   `mapstructure:"couchbase_host"`
	CouchbaseManagementPort int      `mapstructure:"couchbase_management_port"`
	CouchbaseUsername       string   `mapstructure:"couchbase_username"`
	CouchbasePassword       string   `mapstructure:"couchbase_password"`
	CouchbaseSSL            bool     `mapstructure:"couchbase_ssl"`
	Bind                    string   `mapstructure:"bind"`
	FakeCollections         bool     `mapstructure:"fake_collections"`
	LogLevel                LogLevel `mapstructure:"log_level"`
}

func Read

func Read(path string) (*Config, error)

func (Config) MarshalLogObject

func (c Config) MarshalLogObject(enc zapcore.ObjectEncoder) error

type GoUtilsZapLogger

type GoUtilsZapLogger struct {
	Logger *zap.SugaredLogger
}

func (*GoUtilsZapLogger) Debuga

func (g *GoUtilsZapLogger) Debuga(f func() string)

func (*GoUtilsZapLogger) Debugf

func (g *GoUtilsZapLogger) Debugf(fmt string, args ...interface{})

func (*GoUtilsZapLogger) Errora

func (g *GoUtilsZapLogger) Errora(f func() string)

func (*GoUtilsZapLogger) Errorf

func (g *GoUtilsZapLogger) Errorf(fmt string, args ...interface{})

func (*GoUtilsZapLogger) Fatala

func (g *GoUtilsZapLogger) Fatala(f func() string)

func (*GoUtilsZapLogger) Fatalf

func (g *GoUtilsZapLogger) Fatalf(fmt string, args ...interface{})

func (*GoUtilsZapLogger) Infoa

func (g *GoUtilsZapLogger) Infoa(f func() string)

func (*GoUtilsZapLogger) Infof

func (g *GoUtilsZapLogger) Infof(fmt string, args ...interface{})

func (*GoUtilsZapLogger) Level

func (g *GoUtilsZapLogger) Level() logging.Level

func (*GoUtilsZapLogger) Loga

func (g *GoUtilsZapLogger) Loga(level logging.Level, f func() string)

func (*GoUtilsZapLogger) Logf

func (g *GoUtilsZapLogger) Logf(level logging.Level, fmt string, args ...interface{})

func (*GoUtilsZapLogger) Requesta

func (g *GoUtilsZapLogger) Requesta(rlevel logging.Level, f func() string)

func (*GoUtilsZapLogger) Requestf

func (g *GoUtilsZapLogger) Requestf(rlevel logging.Level, fmt string, args ...interface{})

func (*GoUtilsZapLogger) SetLevel

func (g *GoUtilsZapLogger) SetLevel(level logging.Level)

func (*GoUtilsZapLogger) Severea

func (g *GoUtilsZapLogger) Severea(f func() string)

func (*GoUtilsZapLogger) Severef

func (g *GoUtilsZapLogger) Severef(fmt string, args ...interface{})

func (*GoUtilsZapLogger) Tracea

func (g *GoUtilsZapLogger) Tracea(f func() string)

func (*GoUtilsZapLogger) Tracef

func (g *GoUtilsZapLogger) Tracef(fmt string, args ...interface{})

func (*GoUtilsZapLogger) Warna

func (g *GoUtilsZapLogger) Warna(f func() string)

func (*GoUtilsZapLogger) Warnf

func (g *GoUtilsZapLogger) Warnf(fmt string, args ...interface{})

type LogLevel

type LogLevel string
const (
	Trace   LogLevel = "trace"
	Debug   LogLevel = "debug"
	Info    LogLevel = "info"
	Warning LogLevel = "warning"
	Error   LogLevel = "error"
	Panic   LogLevel = "panic"
)

func (LogLevel) ToCBLog

func (l LogLevel) ToCBLog() log.Level

func (LogLevel) ToGoUtils

func (l LogLevel) ToGoUtils() logging.Level

func (LogLevel) ToZap

func (l LogLevel) ToZap() zapcore.Level

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL