noise: github.com/perlin-network/noise/log Index | Files

package log

import "github.com/perlin-network/noise/log"

Index

Package Files

mod.go

func Ctx Uses

func Ctx(ctx context.Context) *zerolog.Logger

Ctx returns the Logger associated with the ctx. If no logger is associated, a disabled logger is returned.

func Debug Uses

func Debug() *zerolog.Event

Debug starts a new message with debug level.

You must call Msg on the returned event in order to send the event.

func Disable Uses

func Disable()

Disable disables the noise logger

func Enable Uses

func Enable()

Enable enables the noise logger

func Error Uses

func Error() *zerolog.Event

Error starts a new message with error level.

You must call Msg on the returned event in order to send the event.

func Fatal Uses

func Fatal() *zerolog.Event

Fatal starts a new message with fatal level. The os.Exit(1) function is called by the Msg method.

You must call Msg on the returned event in order to send the event.

func Hook Uses

func Hook(h zerolog.Hook) zerolog.Logger

Hook returns a logger with the h Hook.

func Info Uses

func Info() *zerolog.Event

Info starts a new message with info level.

You must call Msg on the returned event in order to send the event.

func Level Uses

func Level(level zerolog.Level) zerolog.Logger

Level creates a child logger with the minimum accepted level set to level.

func Log Uses

func Log() *zerolog.Event

Log starts a new message with no level. Setting zerolog.GlobalLevel to zerolog.Disabled will still disable events produced by this method.

You must call Msg on the returned event in order to send the event.

func Output Uses

func Output(w io.Writer) zerolog.Logger

Output duplicates the global logger and sets w as its output.

func Panic Uses

func Panic() *zerolog.Event

Panic starts a new message with panic level. The message is also sent to the panic function.

You must call Msg on the returned event in order to send the event.

func Print Uses

func Print(v ...interface{})

Print sends a log event using debug level and no extra field. Arguments are handled in the manner of fmt.Print.

func Printf Uses

func Printf(format string, v ...interface{})

Printf sends a log event using debug level and no extra field. Arguments are handled in the manner of fmt.Printf.

func Sample Uses

func Sample(s zerolog.Sampler) zerolog.Logger

Sample returns a logger with the s sampler.

func Warn Uses

func Warn() *zerolog.Event

Warn starts a new message with warn level.

You must call Msg on the returned event in order to send the event.

func With Uses

func With() zerolog.Context

With creates a child logger with the field added to its context.

func WithLevel Uses

func WithLevel(level zerolog.Level) *zerolog.Event

WithLevel starts a new message with level.

You must call Msg on the returned event in order to send the event.

Package log imports 5 packages (graph) and is imported by 7 packages. Updated 2019-03-02. Refresh now. Tools for package owners.