multiline

package module
v0.0.0-...-54ca563 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2018 License: MIT Imports: 9 Imported by: 0

README

logspout-multiline

This repo becomes deprecated with the merge of PR in official repo

Usage

Follow the instructions in Custom folder on how to build your own Logspout container with custom modules. Basically just copy the contents of the custom folder and include:

package main

import (
	_ "github.com/zhmaeff/logspout-multiline"
	_ "github.com/looplab/logspout-logstash"
	_ "github.com/gliderlabs/logspout/transports/tcp"
	_ "github.com/gliderlabs/logspout/transports/udp"
)

in modules.go.

Environment variables
  • MULTILINE_ENABLE_DEFAULT - enable multiline logging for all containers (default true)
  • MULTILINE_MATCH - determines which lines the pattern should match, one of first|last|nonfirst|nonlast (default nonfirst)
  • MULTILINE_PATTERN - pattern for multiline logging, see: MULTILINE_MATCH (default: ^\s)
  • MULTILINE_FLUSH_AFTER - maximum time between the first and last lines of a multiline log entry in milliseconds (default: 500)

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMultilineAdapter

func NewMultilineAdapter(route *router.Route) (a router.LogAdapter, err error)

NewMultilineAdapter returns a configured multiline.Adapter

Types

type Adapter

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

Adapter collects multi-lint log entries and sends them to the next adapter as a single entry

func (*Adapter) Stream

func (a *Adapter) Stream(logstream chan *router.Message)

Stream sends log data to the next adapter

Jump to

Keyboard shortcuts

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