Documentation ¶
Index ¶
- func Debug(v ...interface{})
- func Debugf(format string, v ...interface{})
- func Debugln(v ...interface{})
- func Error(v ...interface{})
- func Errorf(format string, v ...interface{})
- func Errorln(v ...interface{})
- func Fatal(v ...interface{})
- func Fatalf(format string, v ...interface{})
- func Fatalln(v ...interface{})
- func Flags() int
- func Info(v ...interface{})
- func Infof(format string, v ...interface{})
- func Infoln(v ...interface{})
- func Output(calldepth int, s string) error
- func Panic(v ...interface{})
- func Panicf(format string, v ...interface{})
- func Panicln(v ...interface{})
- func Prefix() string
- func Print(v ...interface{})
- func Printf(format string, v ...interface{})
- func Println(v ...interface{})
- func SetFlags(flag int)
- func SetLevel(l Level)
- func SetOutput(w io.Writer)
- func SetPrefix(prefix string)
- func Trace(v ...interface{})
- func Tracef(format string, v ...interface{})
- func Traceln(v ...interface{})
- func Warn(v ...interface{})
- func Warnf(format string, v ...interface{})
- func Warnln(v ...interface{})
- func Writer() io.Writer
- type Level
- type Logger
- func (l *Logger) Debug(v ...interface{})
- func (l *Logger) Debugf(format string, v ...interface{})
- func (l *Logger) Debugln(v ...interface{})
- func (l *Logger) Error(v ...interface{})
- func (l *Logger) Errorf(format string, v ...interface{})
- func (l *Logger) Errorln(v ...interface{})
- func (l *Logger) Info(v ...interface{})
- func (l *Logger) Infof(format string, v ...interface{})
- func (l *Logger) Infoln(v ...interface{})
- func (l *Logger) SetLevel(ll Level)
- func (l *Logger) Trace(v ...interface{})
- func (l *Logger) Tracef(format string, v ...interface{})
- func (l *Logger) Traceln(v ...interface{})
- func (l *Logger) Warn(v ...interface{})
- func (l *Logger) Warnf(format string, v ...interface{})
- func (l *Logger) Warnln(v ...interface{})
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Debug ¶
func Debug(v ...interface{})
Debug provides verbose logging beyond regular function - wraps Print
func Debugf ¶
func Debugf(format string, v ...interface{})
Debugf provides verbose logging beyond regular function - wraps Printf
func Debugln ¶
func Debugln(v ...interface{})
Debugln provides verbose logging beyond regular function - wraps Println
func Error ¶
func Error(v ...interface{})
Error provides a "normal production" logging level - wraps Print
func Errorf ¶
func Errorf(format string, v ...interface{})
Errorf provides a "normal production" logging level - wraps Printf
func Errorln ¶
func Errorln(v ...interface{})
Errorln provides a "normal production" logging level - wraps Println
func Fatal ¶
func Fatal(v ...interface{})
Fatal is equivalent to Print() followed by a call to os.Exit(1).
func Fatalf ¶
func Fatalf(format string, v ...interface{})
Fatalf is equivalent to Printf() followed by a call to os.Exit(1).
func Fatalln ¶
func Fatalln(v ...interface{})
Fatalln is equivalent to Println() followed by a call to os.Exit(1).
func Flags ¶
func Flags() int
Flags returns the output flags for the standard logger. The flag bits are Ldate, Ltime, and so on.
func Info ¶
func Info(v ...interface{})
Info provides only informational logging that would typically be written to stdout - wraps Print
func Infof ¶
func Infof(format string, v ...interface{})
Infof provides only informational logging that would typically be written to stdout - wraps Printf
func Infoln ¶
func Infoln(v ...interface{})
Infoln provides only informational logging that would typically be written to stdout - wraps Println
func Output ¶
Output writes the output for a logging event. The string s contains the text to print after the prefix specified by the flags of the Logger. A newline is appended if the last character of s is not already a newline. Calldepth is the count of the number of frames to skip when computing the file name and line number if Llongfile or Lshortfile is set; a value of 1 will print the details for the caller of Output.
func Panic ¶
func Panic(v ...interface{})
Panic is equivalent to Print() followed by a call to panic().
func Panicf ¶
func Panicf(format string, v ...interface{})
Panicf is equivalent to Printf() followed by a call to panic().
func Panicln ¶
func Panicln(v ...interface{})
Panicln is equivalent to Println() followed by a call to panic().
func Print ¶
func Print(v ...interface{})
Print calls Output to print to the standard logger. Arguments are handled in the manner of fmt.Print.
func Printf ¶
func Printf(format string, v ...interface{})
Printf calls Output to print to the standard logger. Arguments are handled in the manner of fmt.Printf.
func Println ¶
func Println(v ...interface{})
Println calls Output to print to the standard logger. Arguments are handled in the manner of fmt.Println.
func SetFlags ¶
func SetFlags(flag int)
SetFlags sets the output flags for the standard logger. The flag bits are Ldate, Ltime, and so on.
func SetLevel ¶
func SetLevel(l Level)
SetLevel Sets the log level for the log package function calls,
func SetPrefix ¶
func SetPrefix(prefix string)
SetPrefix sets the output prefix for the standard logger.
func Tracef ¶
func Tracef(format string, v ...interface{})
Tracef provides the most verbose logging - wraps Printf
func Traceln ¶
func Traceln(v ...interface{})
Traceln provides the most verbose logging - wraps Println
func Warnf ¶
func Warnf(format string, v ...interface{})
Warnf provides slightly more verbose logging - wraps Printf
Types ¶
type Level ¶
type Level int
Level provides a step of level that can be provided to indicate different logging verbosity
const ( // UnknownLevel indicates and unrecognized logging level UnknownLevel Level = -1 // TraceLevel provides the most verbose logging TraceLevel Level = iota // DebugLevel provides verbose logging beyond regular function DebugLevel // WarnLevel provides slightly more verbose logging WarnLevel // ErrorLevel provides a "normal production" logging level ErrorLevel // InfoLevel provides only informational logging that would typically be written to stdout InfoLevel )
func ParseLevel ¶
ParseLevel takes a string and returns the equivalent log Level struct.
type Logger ¶
Logger wraps the default golang log package Logger struct so that we can still use its functionality and formatting while adding Log Level controls
func (*Logger) Debug ¶
func (l *Logger) Debug(v ...interface{})
Debug provides verbose logging beyond regular function - wraps Print
func (*Logger) Debugln ¶
func (l *Logger) Debugln(v ...interface{})
Debugln provides verbose logging beyond regular function - wraps Println
func (*Logger) Error ¶
func (l *Logger) Error(v ...interface{})
Error provides a "normal production" logging level - wraps Print
func (*Logger) Errorln ¶
func (l *Logger) Errorln(v ...interface{})
Errorln provides a "normal production" logging level - wraps Println
func (*Logger) Info ¶
func (l *Logger) Info(v ...interface{})
Info provides only informational logging that would typically be written to stdout - wraps Print
func (*Logger) Infof ¶
Infof provides only informational logging that would typically be written to stdout - wraps Printf
func (*Logger) Infoln ¶
func (l *Logger) Infoln(v ...interface{})
Infoln provides only informational logging that would typically be written to stdout - wraps Println
func (*Logger) Trace ¶
func (l *Logger) Trace(v ...interface{})
Trace provides the most verbose logging - wraps Print
func (*Logger) Traceln ¶
func (l *Logger) Traceln(v ...interface{})
Traceln provides the most verbose logging - wraps Println
func (*Logger) Warn ¶
func (l *Logger) Warn(v ...interface{})
Warn provides slightly more verbose logging - wraps Print