clog

package
v0.0.0-...-09d4767 Latest Latest
Warning

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

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

Documentation

Overview

Package clog is a Context logger.

Index

Constants

This section is empty.

Variables

View Source
var DebugEnabled bool

DebugEnabled will log debug messages.

Functions

func DebugRPC

func DebugRPC(ctx context.Context, method string, req proto.Message, resp proto.Message)

DebugRPC logs a completed RPC call.

func DebugStructured

func DebugStructured(ctx context.Context, structuredPayload any, format string, args ...any)

DebugStructured is like Debugf but sends structuredPayload instead of the text message to Cloud Logging.

func Debugf

func Debugf(ctx context.Context, format string, args ...any)

Debugf simulates logger.Debugf and adds context labels.

func Errorf

func Errorf(ctx context.Context, format string, args ...any)

Errorf simulates logger.Errorf and adds context labels.

func Infof

func Infof(ctx context.Context, format string, args ...any)

Infof simulates logger.Infof and adds context labels.

func Warningf

func Warningf(ctx context.Context, format string, args ...any)

Warningf simulates logger.Warningf and context labels.

func WithLabels

func WithLabels(ctx context.Context, labels map[string]string) context.Context

WithLabels makes a log and context and adds the labels (overwriting any with the same key).

Types

This section is empty.

Jump to

Keyboard shortcuts

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