logx

package
v0.0.0-...-b05aa3b Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package logx implement a simple log rotation mechanism

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Fork

func Fork(w ...io.Writer) io.Writer

Fork output to multiple writers, i.e. w := Fork(os.Stdout, file)

func ForkRotate

func ForkRotate(base, suffix string, writers ...io.Writer) (w io.Writer, err error)

ForkRotate create writer to rotated log file, and fork to other writers filename will generated by base and suffix, plus date info. i.e. w, err := ForkRotate("/var/log/myapp-", ".log", os.Stdout)

func Rotate

func Rotate(base, suffix string) (w io.WriteCloser, err error)

Rotate create a writer to rotated log file. filename will generated by base and suffix, plus date info. i.e. w, err := Rotate("/var/log/myapp-", ".log")

Types

This section is empty.

Jump to

Keyboard shortcuts

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