logging

package
v0.4.19 Latest Latest
Warning

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

Go to latest
Published: May 10, 2024 License: Apache-2.0 Imports: 7 Imported by: 1

Documentation

Overview

Package logging provides logging facilities for Yorkie Server.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Enabled

func Enabled(level zapcore.Level) bool

Enabled returns true if the given level is enabled.

func SetLogLevel

func SetLogLevel(level string) error

SetLogLevel sets the level of global logger with ["debug", "info", "warn", "error", "panic", "fatal"]. SetLoglevel must be sets before calling DefaultLogger() or New().

func With

func With(ctx context.Context, logger Logger) context.Context

With returns a new context with the provided logger.

Types

type Logger

type Logger = *zap.SugaredLogger

Logger is a wrapper of zap.Logger.

func DefaultLogger

func DefaultLogger() Logger

DefaultLogger returns the default logger used by Yorkie.

func From

func From(ctx context.Context) Logger

From returns the logger stored in the provided context.

func New

func New(name string) Logger

New creates a new logger with the given configuration.

Jump to

Keyboard shortcuts

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