rlog

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2022 License: MPL-2.0 Imports: 0 Imported by: 16

Documentation

Overview

Package rlog provides a simple logging interface which is integrated with Encore's inbuilt distributed tracing.

For more information about logging inside Encore applications see https://encore.dev/docs/observability/logging.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug(msg string, keysAndValues ...interface{})

Debug logs a debug-level message. The variadic key-value pairs are treated as they are in With.

func Error

func Error(msg string, keysAndValues ...interface{})

Error logs an error-level message. The variadic key-value pairs are treated as they are in With.

func Info

func Info(msg string, keysAndValues ...interface{})

Info logs an info-level message. The variadic key-value pairs are treated as they are in With.

Types

type Ctx

type Ctx struct {
	// contains filtered or unexported fields
}

Ctx holds additional logging context for use with the Infoc and family of logging functions.

func With

func With(keysAndValues ...interface{}) Ctx

With adds a variadic number of fields to the logging context. The keysAndValues must be pairs of string keys and arbitrary data.

func (Ctx) Debug

func (Ctx) Debug(msg string, keysAndValues ...interface{})

Debug logs a debug-level message, merging the context from ctx with the additional context provided as key-value pairs. The variadic key-value pairs are treated as they are in With.

func (Ctx) Error

func (Ctx) Error(msg string, keysAndValues ...interface{})

Error logs an error-level message, merging the context from ctx with the additional context provided as key-value pairs. The variadic key-value pairs are treated as they are in With.

func (Ctx) Info

func (Ctx) Info(msg string, keysAndValues ...interface{})

Info logs an info-level message, merging the context from ctx with the additional context provided as key-value pairs. The variadic key-value pairs are treated as they are in With.

func (Ctx) With

func (Ctx) With(keysAndValues ...interface{}) Ctx

With creates a new logging context that inherits the context from the original ctx and adds additional context on top. The original ctx is not affected.

Jump to

Keyboard shortcuts

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