dailylog

package module
v0.0.0-...-234d840 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2020 License: GPL-3.0 Imports: 11 Imported by: 0

README

dailylog

daily log writer for golang

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Dirname        string        `json:"dirname"         yaml:"dirname"         toml:"dirname"`
	FilePrefix     string        `json:"file-prefix"     yaml:"file-prefix"     toml:"file-prefix"`
	FileExt        string        `json:"file-ext"        yaml:"file-ext"        toml:"file-ext"`
	KeepMaxDays    int           `json:"keep-max-days"   yaml:"keep-max-days"   toml:"keep-max-days"`
	RotateInterval period.Period `json:"rotate-interval" yaml:"rotate-interval" toml:"rotate-interval"`
}

Intervals in minutes

type Writer

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

func New

func New(c Config) (*Writer, error)

func (*Writer) Close

func (w *Writer) Close() error

func (*Writer) Rotate

func (w *Writer) Rotate() error

func (*Writer) Write

func (w *Writer) Write(data []byte) (n int, err error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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