logger

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2023 License: MIT Imports: 13 Imported by: 3

README

logger

Go library for generic logging.

Documentation

Overview

Package logger provides methods for logging events.

Index

Constants

View Source
const (
	// PackageType reflects the object type.
	PackageType = "logprovider"
)

Variables

This section is empty.

Functions

func Error

func Error(ctx context.Context, data string)

Error logs an error.

func Fatal

func Fatal(ctx context.Context, data string)

Fatal logs a fatal message and then exits.

func Flush

func Flush(ctx context.Context) error

Flush flushes logs.

func Info

func Info(ctx context.Context, data string)

Info logs an informational message.

func Verbose

func Verbose(ctx context.Context, data string)

Verbose logs a verbose message.

func Wait

func Wait(ctx context.Context)

Wait waits until the logger is available.

func Warn

func Warn(ctx context.Context, data string)

Warn logs a warning.

Types

type LogProvider

type LogProvider struct{}

LogProvider structure to expose logger to third party components.

func (LogProvider) Output

func (l LogProvider) Output(depth int, data string) error

Output method used by mgo debug logger.

Directories

Path Synopsis
types
context
Package context provides constants for tracking context variables.
Package context provides constants for tracking context variables.
env
Package env contains reused environment variables.
Package env contains reused environment variables.

Jump to

Keyboard shortcuts

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