logstash

package module
v2.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

README

krakend-logstash

A KrakenD log formatter compatible with logstash

Documentation

Overview

Package logstash provides a logstash formatter for the krakend-gologging pkg

Index

Constants

View Source
const (
	LEVEL_DEBUG    = "DEBUG"
	LEVEL_INFO     = "INFO"
	LEVEL_WARNING  = "WARNING"
	LEVEL_ERROR    = "ERROR"
	LEVEL_CRITICAL = "CRITICAL"

	ISO_8601 = "2006-01-02T15:04:05.000000-07:00"
)
View Source
const Namespace = "github_com/devopsfaith/krakend-logstash"

Variables

View Source
var (
	ErrNothingToLog = errors.New("nothing to log")
	ErrWrongConfig  = fmt.Errorf("getting the extra config for the krakend-logstash module")
)

Functions

func NewLogger

func NewLogger(cfg config.ExtraConfig, ws ...io.Writer) (logging.Logger, error)

NewLogger returns a krakend logger wrapping a gologging logger

Types

type LogLevel

type LogLevel string

type Logger

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

Logger is a wrapper over a github.com/devopsfaith/krakend/logging logger

func (*Logger) Critical

func (l *Logger) Critical(v ...interface{})

Critical implements the logger interface

func (*Logger) Debug

func (l *Logger) Debug(v ...interface{})

Debug implements the logger interface

func (*Logger) Error

func (l *Logger) Error(v ...interface{})

Error implements the logger interface

func (*Logger) Fatal

func (l *Logger) Fatal(v ...interface{})

Fatal implements the logger interface

func (*Logger) Info

func (l *Logger) Info(v ...interface{})

Info implements the logger interface

func (*Logger) Warning

func (l *Logger) Warning(v ...interface{})

Warning implements the logger interface

Jump to

Keyboard shortcuts

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