clog

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2022 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Overview

Package clog provides a context aware leveled logger.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Logger

func Logger(ctx context.Context) *zap.SugaredLogger

Logger returns a zap logger with as much context as possible.

func NewLogger

func NewLogger(ctx context.Context, lvl string) *zap.SugaredLogger

NewLogger returns a zap logger without any context to build from. Handles setting things like log level.

func WithRqID

func WithRqID(ctx context.Context, rqID string) context.Context

WithRqID returns a context which knows its requist ID.

func WithSessionID

func WithSessionID(ctx context.Context, sessionID string) context.Context

WithSessionID returns a context which knows its session ID.

Types

This section is empty.

Jump to

Keyboard shortcuts

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