Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewLoggerWriter ¶
func NewLoggerWriter(logger *log.Logger, prefix string) io.WriteCloser
NewLoggerWriter create a new io.WriteCloser that append each line to log.procLogger
func NewRotatingFile ¶
func NewRotatingFile(opts RotatingFileOptions) (w io.WriteCloser, err error)
NewRotatingFile create a new io.WriteCloser as a rotating log file
Types ¶
type Output ¶
type Output interface { // WriteCloser is for single line writing io.WriteCloser // ReaderFrom is for streaming io.ReaderFrom }
Output interface for single stream log output
func MultiOutput ¶
MultiOutput create a new Output for proc logging
type ProcLogger ¶
type ProcLogger interface { Print(items ...interface{}) Printf(layout string, items ...interface{}) Error(items ...interface{}) Errorf(layout string, items ...interface{}) ProcOutput }
func CreateSimpleLogger ¶ added in v1.15.1
func CreateSimpleLogger(dir string, name string, pfx string) (ProcLogger, error)
func NewProcLogger ¶
func NewProcLogger(opts ProcLoggerOptions) (pl ProcLogger, err error)
type ProcLoggerOptions ¶
type ProcOutput ¶
ProcOutput interface for process
type RotatingFileOptions ¶
type RotatingFileOptions struct { // Dir directory Dir string // Filename filename prefix Filename string // MaxFileSize max size of a single file, default to 128mb MaxFileSize int64 // MaxFileCount max count of rotated files MaxFileCount int64 }
RotatingFileOptions options for creating a RotatingFile
Click to show internal directories.
Click to hide internal directories.