Documentation ¶
Index ¶
- Constants
- func NewJaegerTracer() (opentracing.Tracer, io.Closer, error)
- func NewMatcher() language.Matcher
- func NewStandardLogger(host string, service string, writer io.Writer) (*standardLogger, func(), error)
- func NewZapLogger(path string, host string, service string, level Level) (*zapLogger, func(), error)
- type Config
- type Level
- type Logger
- type SortKey
Constants ¶
View Source
const ( Degub = -1 Info = 0 Warn = 1 Error = 2 Critical = 3 )
Variables ¶
This section is empty.
Functions ¶
func NewJaegerTracer ¶
func NewStandardLogger ¶
Types ¶
type Config ¶
type Config struct { IsCGI bool `mapstructure:"IS_CGI"` ServerAddress string `mapstructure:"SERVER_ADDRESS"` URLPrefix string `mapstructure:"SERVER_URL_PREFIX"` DBDriver string `mapstructure:"DB_DRIVER"` DBSource string `mapstructure:"DB_SOURCE"` LogPath string `mapstructure:"LOG_PATH"` Host string `mapstructure:"HOST"` Service string `mapstructure:"SERVICE"` GRPCURL string `mapstructure:"GRPC_URL"` }
func LoadConfig ¶
Load config parameters using viper
type Logger ¶
type Logger interface { Critical(ctx context.Context, msg string) Error(ctx context.Context, mst string) Warn(ctx context.Context, mst string) Info(ctx context.Context, mst string) Debug(ctx context.Context, mst string) Criticalf(ctx context.Context, msg string, a ...interface{}) Errorf(ctx context.Context, mst string, a ...interface{}) Warnf(ctx context.Context, mst string, a ...interface{}) Infof(ctx context.Context, mst string, a ...interface{}) Debugf(ctx context.Context, mst string, a ...interface{}) Print(ctx context.Context, lv Level, msg string) }
Click to show internal directories.
Click to hide internal directories.