silentzap

package
v3.8.1 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LoggingContextRegistry

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

func (*LoggingContextRegistry) Get

func (*LoggingContextRegistry) Inject

func (*LoggingContextRegistry) Notify

func (r *LoggingContextRegistry) Notify(_ context.Context, event flamingo.Event)

type Module

type Module struct{}

Module for Silent ZAP logging

func (*Module) Configure

func (m *Module) Configure(injector *dingo.Injector)

Configure the ZAP logger as flamingo.Logger (in JSON mode kibana compatible)

func (*Module) CueConfig

func (m *Module) CueConfig() string

CueConfig Schema

func (*Module) FlamingoLegacyConfigAlias

func (*Module) FlamingoLegacyConfigAlias() map[string]string

FlamingoLegacyConfigAlias mapping

type SilentContext

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

type SilentLogger

type SilentLogger struct {
	*zap.Logger
	// contains filtered or unexported fields
}

SilentLogger is a Wrapper for the zap logger fulfilling the flamingo.Logger interface

func (*SilentLogger) Debug

func (l *SilentLogger) Debug(args ...interface{})

Debug logs a message at debug level

func (*SilentLogger) Debugf

func (l *SilentLogger) Debugf(log string, args ...interface{})

Debugf logs a message at debug level with format string

func (*SilentLogger) Error

func (l *SilentLogger) Error(args ...interface{})

Error logs a message at error level

func (*SilentLogger) Fatal

func (l *SilentLogger) Fatal(args ...interface{})

Fatal logs a message at fatal level The logger then calls os.Exit(1), even if logging at FatalLevel is disabled.

func (*SilentLogger) Flush

func (l *SilentLogger) Flush()

Flush is used by buffered loggers and triggers the actual writing. It is a good habit to call Flush before letting the process exit. For the top level flamingo.Logger, this is called by the app itself.

func (*SilentLogger) Info

func (l *SilentLogger) Info(args ...interface{})

Info logs a message at info level

func (*SilentLogger) Panic

func (l *SilentLogger) Panic(args ...interface{})

Panic logs a message at panic level The logger then panics, even if logging at PanicLevel is disabled.

func (*SilentLogger) Warn

func (l *SilentLogger) Warn(args ...interface{})

Warn logs a message at warn level

func (*SilentLogger) WithContext

func (l *SilentLogger) WithContext(ctx context.Context) flamingo.Logger

func (*SilentLogger) WithField

func (l *SilentLogger) WithField(key flamingo.LogKey, value interface{}) flamingo.Logger

WithField creates a child logger and adds structured context to it.

func (*SilentLogger) WithFields

func (l *SilentLogger) WithFields(fields map[flamingo.LogKey]interface{}) flamingo.Logger

WithFields creates a child logger and adds structured context to it.

Jump to

Keyboard shortcuts

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