writer

package
v0.3.5 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package writer contains some writers implementation for access logging.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FluentLogWriter

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

FluentLogWriter is the log writer that implements io.Writer. It writes a log by Fluent Forwarder.

func NewFluentLogWriter

func NewFluentLogWriter(tag, host string, port int) (*FluentLogWriter, error)

NewFluentLogWriter creates a new FluentLogWriter.

func NewFluentLogWriterFromForwarder

func NewFluentLogWriterFromForwarder(tag string, f *fluent.Fluent) *FluentLogWriter

NewFluentLogWriterFromForwarder creates a new FluentLigWriter from Fluent Forwarder.

func (*FluentLogWriter) Close

func (f *FluentLogWriter) Close() error

Close closes underlying connections with the Fluent daemon.

func (*FluentLogWriter) Write

func (f *FluentLogWriter) Write(p []byte) (n int, err error)

Write writes a log.

Jump to

Keyboard shortcuts

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