Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Console log.Logger
Console writes the logs directly to the console (not speed of writing is different on different OSs)
var File log.Logger
File writes the logs directly to a log file, either the 'all' file and/or the 'error' file.
Functions ¶
func New ¶
New creates an instance of the logger and sets the current instance. Taking a 'fileSize' of the log files (all and error). The number `fileBackups` to keep for each log file. And a bool indicating if the caller+line number, should be included.
func NewCustom ¶
func NewCustom(fileSize int64, fileBackups int, allFileName string, errorFileName string, logsFolderPath string)
NewCustom creates an instance of the logger and sets the current instance. Taking a 'fileSize' of the log files (all and error). The number `fileBackups` to keep for each log file. A name for the 'all' file. A name for the 'error' file. And the path to the folder to store the logs.
func NewCustomFull ¶
func NewCustomFull(fileSize int64, fileBackups int, allFileName string, errorFileName string, logsFolderPath string, includeCaller bool)
NewCustomFull creates an instance of the logger and sets the current instance. Taking a 'fileSize' of the log files (all and error). The number `fileBackups` to keep for each log file. A name for the 'all' file. A name for the 'error' file. The path to the folder to store the logs. And a bool indicating if the caller+line number, should be included.