logger

package
v0.0.0-...-b3f521c Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2017 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package logger shows a pattern of using a buffer to handle log write continuity by dealing with write latencies by throwing away log data.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Logger

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

Logger provides support to throw log lines away if log writes start to timeout due to latency.

func New

func New(w io.Writer, size int) *Logger

New creates a logger value and initializes it for use. The user can pass the size of the buffer to use for continuity.

func (*Logger) Shutdown

func (l *Logger) Shutdown()

Shutdown closes the logger and wait for the writer goroutine to terminate.

func (*Logger) Write

func (l *Logger) Write(data string)

Write is used to write the data to the log.

Directories

Path Synopsis
This sample program demonstrates how the logger package works.
This sample program demonstrates how the logger package works.

Jump to

Keyboard shortcuts

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