logger

package
v0.13.13-0...-98661b4 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Core

type Core struct {
	// contains filtered or unexported fields
}

Core is a zap Core used for logging

func (*Core) Check

func (c *Core) Check(zapEntry zapcore.Entry, checkedEntry *zapcore.CheckedEntry) *zapcore.CheckedEntry

Check checks the entry and determines if the core should write it.

func (*Core) Enabled

func (c *Core) Enabled(level zapcore.Level) bool

Enabled will check if the supplied log level is enabled.

func (*Core) Sync

func (c *Core) Sync() error

Sync will sync the underlying core.

func (*Core) With

func (c *Core) With(fields []zapcore.Field) zapcore.Core

With adds contextual fields to the underlying core.

func (*Core) Write

func (c *Core) Write(zapEntry zapcore.Entry, fields []zapcore.Field) error

Write sends an entry to the emitter before logging.

type Emitter

type Emitter struct {
	// contains filtered or unexported fields
}

Emitter emits internal logs to registered receivers.

func (*Emitter) AddReceiver

func (e *Emitter) AddReceiver(receiver Receiver)

AddReceiver will add a receiver to the emitter.

type Logger

type Logger struct {
	*zap.SugaredLogger
	*Emitter
}

Logger is a wrapped logger used by the stanza agent.

func New

func New(sugared *zap.SugaredLogger) *Logger

New will create a new logger.

type Receiver

type Receiver chan entry.Entry

Receiver is a channel that receives internal stanza logs.

Jump to

Keyboard shortcuts

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