Documentation ¶
Index ¶
- Constants
- func BuildLogger(cfg Config, options ...zap.Option) (*zap.Logger, error)
- func WithTrace(ctx context.Context, log *zap.Logger) *zap.Logger
- type Config
- type Level
- type Leveler
- type WatcherCore
- func (m *WatcherCore) Check(entry zapcore.Entry, checkedEntry *zapcore.CheckedEntry) *zapcore.CheckedEntry
- func (m *WatcherCore) Subscribe(tx chan<- string) string
- func (m *WatcherCore) Unsubscribe(id string)
- func (m *WatcherCore) With(fields []zapcore.Field) zapcore.Core
- func (m *WatcherCore) Write(entry zapcore.Entry, fields []zapcore.Field) error
Constants ¶
View Source
const ( StdoutLogOutput = "stdout" StderrLogOutput = "stderr" )
Variables ¶
This section is empty.
Functions ¶
func BuildLogger ¶
BuildLogger return new zap.Logger instance with given severity and debug settings.
Types ¶
type Config ¶ added in v0.4.1
type Config struct { Level *Level `yaml:"level" required:"true" default:"info"` Output string `yaml:"output" default:"stdout"` }
Config represents a logging config.
type Level ¶ added in v0.4.1
type Level struct {
// contains filtered or unexported fields
}
Level represents a shifted zap logging level that is able to being constructed from YAML.
func NewLevelFromString ¶ added in v0.4.1
func (Level) MarshalText ¶ added in v0.4.6
func (*Level) UnmarshalYAML ¶ added in v0.4.1
type Leveler ¶ added in v0.4.1
type Leveler interface { // LogLevel return log verbosity. LogLevel() Level }
type WatcherCore ¶ added in v0.4.21
func NewWatcherCore ¶ added in v0.4.21
func NewWatcherCore() *WatcherCore
func (*WatcherCore) Check ¶ added in v0.4.21
func (m *WatcherCore) Check(entry zapcore.Entry, checkedEntry *zapcore.CheckedEntry) *zapcore.CheckedEntry
func (*WatcherCore) Subscribe ¶ added in v0.4.21
func (m *WatcherCore) Subscribe(tx chan<- string) string
func (*WatcherCore) Unsubscribe ¶ added in v0.4.21
func (m *WatcherCore) Unsubscribe(id string)
Click to show internal directories.
Click to hide internal directories.