outputs

package
v0.11.3 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2021 License: MIT Imports: 34 Imported by: 0

Documentation

Overview

Modified version of lumberjack (https://github.com/natefinch/lumberjack)

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitCLIParams

func InitCLIParams()

func ValidateCLIParams

func ValidateCLIParams() error

func WriteToOutputs

func WriteToOutputs(src, timestamp string) error

Types

type TmpWriter

type TmpWriter struct {
	WriteCount int
	// contains filtered or unexported fields
}

func (*TmpWriter) Close

func (l *TmpWriter) Close() error

Close implements io.Closer, and closes the current logfile.

func (*TmpWriter) CurrentFile

func (l *TmpWriter) CurrentFile() *os.File

Return current log file pointer

func (*TmpWriter) DeleteCurrentFile

func (l *TmpWriter) DeleteCurrentFile() (err error)

Delete current log file and update struct

func (*TmpWriter) DeletePreviousFile

func (l *TmpWriter) DeletePreviousFile() (err error)

Delete previous log file and update struct

func (*TmpWriter) Exit

func (l *TmpWriter) Exit() (err error)

Close open file and cleanup any current or previous log files

func (*TmpWriter) PreviousFile

func (l *TmpWriter) PreviousFile() *os.File

Return previous log file pointer

func (*TmpWriter) Rotate

func (l *TmpWriter) Rotate() error

Rotate causes TmpWriter to close the existing log file and immediately create a new one.

func (*TmpWriter) Size

func (l *TmpWriter) Size() int64

Returns current file size

func (*TmpWriter) Write

func (l *TmpWriter) Write(p []byte) (n int, err error)

Write implements io.Writer.

func (*TmpWriter) WriteString

func (l *TmpWriter) WriteString(s string) (n int, err error)

Jump to

Keyboard shortcuts

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