log

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2023 License: MPL-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Helpers for ECS log formatting https://www.elastic.co/guide/en/ecs/master/index.html

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(config *config.Config)

Init sets up logging based on the current environment

Types

type ECSEvent

type ECSEvent struct {
	Action   string
	Duration time.Duration
}

ECSEvent represents a subset of the fields of the ECS Event object

func (ECSEvent) MarshalLogObject

func (o ECSEvent) MarshalLogObject(enc zapcore.ObjectEncoder) error

type ECSHTTP

type ECSHTTP struct {
	Request  ECSRequest
	Response ECSResponse
}

ECSHTTP represents a subset of the fields of the ECS HTTP object

func (ECSHTTP) MarshalLogObject

func (o ECSHTTP) MarshalLogObject(enc zapcore.ObjectEncoder) error

type ECSRequest

type ECSRequest struct {
	Method string
}

ECSRequest represents a subset of the fields of the ECS HTTP Request object

func (ECSRequest) MarshalLogObject

func (o ECSRequest) MarshalLogObject(enc zapcore.ObjectEncoder) error

type ECSResponse

type ECSResponse struct {
	StatusCode int
}

ECSResponse represents a subset of the fields of the ECS HTTP Response object

func (ECSResponse) MarshalLogObject

func (o ECSResponse) MarshalLogObject(enc zapcore.ObjectEncoder) error

type ECSTrace added in v0.0.9

type ECSTrace struct {
	ID string
}

ECSTrace represents a subset of the fields of the ECS Trace object

func (ECSTrace) MarshalLogObject added in v0.0.9

func (o ECSTrace) MarshalLogObject(enc zapcore.ObjectEncoder) error

type ECSURL

type ECSURL struct {
	Original string
}

ECSURL represents a subset of the fields of the ECS URL object

func (ECSURL) MarshalLogObject

func (o ECSURL) MarshalLogObject(enc zapcore.ObjectEncoder) error

Jump to

Keyboard shortcuts

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