logger

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const DATADOG_INGEST_URL = "https://http-intake.logs.datadoghq.eu/api/v2/logs"

Variables

This section is empty.

Functions

This section is empty.

Types

type DatadogIngestClient added in v1.1.0

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

func (DatadogIngestClient) SendEvent added in v1.1.0

func (c DatadogIngestClient) SendEvent(eventDetails map[string]interface{}) error

type Logger

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

func CreateDevelopmentLogger

func CreateDevelopmentLogger(initialFields map[string]interface{}) (*Logger, error)

func CreateLogger

func CreateLogger(opts *LoggerOptions) (*Logger, error)

func CreateProductionLogger

func CreateProductionLogger(initialFields map[string]interface{}) (*Logger, error)

func (*Logger) Debug

func (txLogger *Logger) Debug(event_type string, message string, extraFields *map[string]interface{})

func (*Logger) Error

func (txLogger *Logger) Error(event_type string, message string, extraFields *map[string]interface{})

func (*Logger) Fatal

func (txLogger *Logger) Fatal(event_type string, message string, extraFields *map[string]interface{})

func (*Logger) Info

func (txLogger *Logger) Info(event_type string, message string, extraFields *map[string]interface{})

func (*Logger) Warn

func (txLogger *Logger) Warn(event_type string, message string, extraFields *map[string]interface{})

type LoggerOptions added in v1.1.0

type LoggerOptions struct {
	IsProduction      bool
	InitialFields     map[string]interface{}
	DatadogApiKey     *string
	DatadogIngestHost *string
}

Jump to

Keyboard shortcuts

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