Documentation ¶
Index ¶
- Constants
- func Fatal(a ...interface{})
- func Fatalf(format string, v ...interface{})
- func Fatalln(a ...interface{})
- func Flags() int
- func Output(calldepth int, s string) error
- func Panic(a ...interface{})
- func Panicf(format string, v ...interface{})
- func Panicln(a ...interface{})
- func Prefix() string
- func Print(a ...interface{})
- func Printf(format string, v ...interface{})
- func Println(a ...interface{})
- func SetFlags(flag int)
- func SetOutput(w io.Writer)
- func SetPrefix(prefix string)
- func Success(a ...interface{})
- func Successf(format string, v ...interface{})
- func Successln(a ...interface{})
- func Writer() io.Writer
- type ColoredLogger
- func (l *ColoredLogger) Fatal(a ...interface{})
- func (l *ColoredLogger) Fatalf(format string, v ...interface{})
- func (l *ColoredLogger) Fatalln(a ...interface{})
- func (l *ColoredLogger) Flags() int
- func (l *ColoredLogger) Output(calldepth int, s string) error
- func (l *ColoredLogger) Panic(a ...interface{})
- func (l *ColoredLogger) Panicf(format string, v ...interface{})
- func (l *ColoredLogger) Panicln(a ...interface{})
- func (l *ColoredLogger) Prefix() string
- func (l *ColoredLogger) Print(a ...interface{})
- func (l *ColoredLogger) Printf(format string, v ...interface{})
- func (l *ColoredLogger) Println(a ...interface{})
- func (l *ColoredLogger) SetFlags(i int)
- func (l *ColoredLogger) SetOutput(w io.Writer)
- func (l *ColoredLogger) SetPrefix(s string)
- func (l *ColoredLogger) Success(a ...interface{})
- func (l *ColoredLogger) Successf(format string, v ...interface{})
- func (l *ColoredLogger) Successln(a ...interface{})
- func (l *ColoredLogger) Writer() io.Writer
Constants ¶
View Source
const ( Red = "\033[31m" Green = "\033[32m" Yellow = "\033[33m" Blue = "\033[34m" Purple = "\033[35m" Cyan = "\033[36m" White = "\033[37m" )
Variables ¶
This section is empty.
Functions ¶
func Fatalf ¶
func Fatalf(format string, v ...interface{})
Similar to log.Fatalf Prints in error color
func Flags ¶
func Flags() int
Flags returns the output flags for the standard logger. The flag bits are Ldate, Ltime, and so on.
func Panicf ¶
func Panicf(format string, v ...interface{})
Similar to log.Panicf Prints in error color
func Print ¶
func Print(a ...interface{})
Prints to io.Writer Uses log.Print, prints in default color
func Printf ¶
func Printf(format string, v ...interface{})
Prints to io.Writer with formated text Uses log.Printf, prints in default color
func Println ¶
func Println(a ...interface{})
Prints to io.Writer with new line Uses log.Println, prints in default color
Types ¶
type ColoredLogger ¶
type ColoredLogger struct {
// contains filtered or unexported fields
}
func NewColored ¶
func (*ColoredLogger) Fatal ¶
func (l *ColoredLogger) Fatal(a ...interface{})
func (*ColoredLogger) Fatalf ¶
func (l *ColoredLogger) Fatalf(format string, v ...interface{})
func (*ColoredLogger) Fatalln ¶
func (l *ColoredLogger) Fatalln(a ...interface{})
func (*ColoredLogger) Flags ¶
func (l *ColoredLogger) Flags() int
func (*ColoredLogger) Panic ¶
func (l *ColoredLogger) Panic(a ...interface{})
func (*ColoredLogger) Panicf ¶
func (l *ColoredLogger) Panicf(format string, v ...interface{})
func (*ColoredLogger) Panicln ¶
func (l *ColoredLogger) Panicln(a ...interface{})
func (*ColoredLogger) Prefix ¶
func (l *ColoredLogger) Prefix() string
func (*ColoredLogger) Print ¶
func (l *ColoredLogger) Print(a ...interface{})
func (*ColoredLogger) Printf ¶
func (l *ColoredLogger) Printf(format string, v ...interface{})
func (*ColoredLogger) Println ¶
func (l *ColoredLogger) Println(a ...interface{})
func (*ColoredLogger) SetOutput ¶
func (l *ColoredLogger) SetOutput(w io.Writer)
Sets outputs of all types of logs to input wirter
func (*ColoredLogger) Success ¶
func (l *ColoredLogger) Success(a ...interface{})
func (*ColoredLogger) Successf ¶
func (l *ColoredLogger) Successf(format string, v ...interface{})
func (*ColoredLogger) Successln ¶
func (l *ColoredLogger) Successln(a ...interface{})
func (*ColoredLogger) Writer ¶
func (l *ColoredLogger) Writer() io.Writer
Click to show internal directories.
Click to hide internal directories.