Documentation ¶
Index ¶
- type Lumber
- func (L Lumber) Debug(msg string)
- func (L Lumber) Debugf(format string, v ...interface{})
- func (L Lumber) Debugln(msg string)
- func (L Lumber) Error(msg string)
- func (L Lumber) Errorf(format string, v ...interface{})
- func (L Lumber) Errorln(msg string)
- func (L Lumber) Fatal(msg string, exitCode int)
- func (L Lumber) Fatalf(exitCode int, format string, v ...interface{})
- func (L Lumber) Fatalln(msg string, exitCode int)
- func (L Lumber) Info(msg string)
- func (L Lumber) Infof(format string, v ...interface{})
- func (L Lumber) Infoln(msg string)
- func (L Lumber) SetLogFile(logLevel string, filename string) error
- func (L Lumber) Warn(msg string)
- func (L Lumber) Warnf(format string, v ...interface{})
- func (L Lumber) Warnln(msg string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Lumber ¶
type Lumber struct { DebugLog *log.Logger DebugFileLogger *log.Logger InfoLog *log.Logger InfoFileLogger *log.Logger WarnLog *log.Logger WarnFileLogger *log.Logger ErrorLog *log.Logger ErrorFileLogger *log.Logger FatalLog *log.Logger FatalFileLogger *log.Logger }
Lumber is a struct to hold loggers
func New ¶
func New() *Lumber
New returns a new instance of Lumber This default behaviour will log everything to STDOUT
Arguments:
None
Returns:
(*Lumber): A pointer to the newly created instance of Lumber
func (Lumber) Debug ¶
Debug takes a message string and logs that message
Arguments:
msg (string): The message to log
Returns:
None
func (Lumber) Debugf ¶
Debugf takes a formatted message string and logs that message as a debug message
Arguments:
format (string): The formatted message to log v (...interface{}): any number of variables to use to format the message
Returns:
None
func (Lumber) Debugln ¶
Debugln takes a message string and logs that message with a newline inluded
Arguments:
msg (string): The message to log
Returns:
None
func (Lumber) Error ¶
Error takes a message string and logs that message as a erronious message
Arguments:
msg (string): The message to log
Returns:
None
func (Lumber) Errorf ¶
Errorf takes a formatted message string and logs that message as an erronious message
Arguments:
format (string): The formatted message to log v (...interface{}): any number of variables to use to format the message
Returns:
None
func (Lumber) Errorln ¶
Errorln takes a message string and logs that message with a newline inluded
Arguments:
msg (string): The message to log
Returns:
None
func (Lumber) Fatal ¶
Fatal takes a message string and logs that message as a fatal message
Arguments:
msg (string): The message to log exitCode (int): The exit code to exit the application with
Returns:
None
func (Lumber) Fatalf ¶
Fatalf takes a formatted message string and logs that message as a fatal message
Arguments:
exitCode (int): The exit code to exit the application with format (string): The formatted message to log v (...interface{}): Any number of variables to use to format the message
Returns:
None
func (Lumber) Fatalln ¶
Fatalln takes a message string and logs that message as a fatal message with a newline inluded
Arguments:
msg (string): The message to log exitCode (int): The exit code to exit the application with
Returns:
None
func (Lumber) Info ¶
Info takes a message string and logs that message as an info message
Arguments:
msg (string): The message to log
Returns:
None
func (Lumber) Infof ¶
Infof takes a formatted message string and logs that message as an info message
Arguments:
format (string): The formatted message to log v (...interface{}): any number of variables to use to format the message
Returns:
None
func (Lumber) Infoln ¶
Infoln takes a message string and logs that message with a newline inluded
Arguments:
msg (string): The message to log
Returns:
None
func (Lumber) SetLogFile ¶
SetLogFile will set a log file for the provided logger
Arguments:
filename (string): the name of the file to write l (*log.Logger): the lumber logger to set this output file for
Returns:
(error): an error if one exists, nil otherwise
func (Lumber) Warn ¶
Warn takes a message string and logs that message as a warning message
Arguments:
msg (string): The message to log
Returns:
None