logformatter

package
v0.0.0-...-83e654d Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2017 License: MIT Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LogstashFormatter

type LogstashFormatter struct {

	//Type of the fields
	Type string // if not empty use for logstash type field.

	//Env is the environment on which the application is running
	Env string

	//ServiceName will be by default guble
	ServiceName string

	//ApplicationType will be  by default "service". Other values could be "service", "system", "appserver", "webserver"
	ApplicationType string

	//LogType will be by default  application. Other possible values "access", "error", "application", "system"
	LogType string

	//TimestampFormat sets the format used for timestamps.
	TimestampFormat string
}

LogstashFormatter generates json in logstash format. Logstash site: http://logstash.net/

func (*LogstashFormatter) Format

func (f *LogstashFormatter) Format(entry *logrus.Entry) ([]byte, error)

Format the logrus entry to a byte slice, or return an error.

Jump to

Keyboard shortcuts

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