ulog

package
v1.1.7 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Console log.Logger

Console writes the logs directly to the console (not speed of writing is different on different OSs)

File writes the logs directly to a log file, either the 'all' file and/or the 'error' file.

Functions

func New

func New(fileSize int64, fileBackups int, includeCaller bool)

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.

Types

type UmbrellaLogger

type UmbrellaLogger struct {
	Console log.Logger
	File    log.Logger
}

Jump to

Keyboard shortcuts

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