log2file

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2021 License: MIT Imports: 6 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Log2FileStruct

type Log2FileStruct struct {
	// Skip previous caller, usually the 1st is the good
	CallerSkip int

	DevMode bool

	LogFilename string
	// contains filtered or unexported fields
}

Log2FileStruct: Structure that hold methods to manage logging to file (errors and/or strings). On main program exit, logger must be closed using "CloseLogger" method: defer Logger.CloseLogger()

func Log2FileStructNew

func Log2FileStructNew(logFilename string, devMode bool) (l2f *Log2FileStruct)

Log2FileNew: Create a new Log2File structure

func (*Log2FileStruct) CloseLogger

func (l2f *Log2FileStruct) CloseLogger()

CloseLogger: Whan main program EXIT this method must to be called to properly close lo file.

func (*Log2FileStruct) Log

func (l2f *Log2FileStruct) Log(messageIn ...interface{}) (err error)

Log: Record "messageIn" to file, can be an error and/or a string NOTICE: first argument must be the error to speed up treatment. return a cleaned 'nil' error

Jump to

Keyboard shortcuts

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