Search and commands

↑ ↓ to select · Enter to open · Esc to close

Type to search packages.

logger

v0.1.8
github.com/takama/grpc/pkg/logger

Documentation

pkg.go.dev ↗

Table of contents

↓ to select · Enter to jump· Shift+Enter for source

17 matches

Top ↑

Functions

New

func New(cfg *Config) *zap.Logger

New creates and configure new zap logger. nolint: funlen

ZapLevelConverter

func ZapLevelConverter(level Level) zapcore.Level

Types

Config

type Config struct {
	Format string
	Level  Level
	Time   bool
	Out    zapcore.WriteSyncer
	Err    zapcore.WriteSyncer
}

Config contains params to setup logger.

Formatter

type Formatter int

Formatter defines output formatter.

TextFormatter (2 declarations)

const (
	TextFormatter Formatter = iota
	JSONFormatter
)

Format of outputs.

Formatter.String

func (f Formatter) String() string

Level

type Level int8

Level defines log levels.

LevelDebug (6 declarations)

const (
	LevelDebug Level = iota
	LevelInfo
	LevelWarn
	LevelError
	LevelFatal
	LevelPanic
)

Log levels.

Level.String

func (l Level) String() string

Dependency graph