Documentation ¶
Index ¶
- Constants
- func ChangeLogFMT(sep string, trim bool, enableAppName bool)
- func Debug(format string, args ...interface{})
- func Error(format string, args ...interface{})
- func Fatal(format string, args ...interface{})
- func GetLogLevel() int
- func GetLogLevelToString(l int) string
- func Info(format string, args ...interface{})
- func InitLogger(cfg *cfgargs.SrvConfig)
- func Warn(format string, args ...interface{})
- type LogWriter
- type Logger
- type LoggerWriterConsole
- type LoggerWriterFile
Constants ¶
View Source
const ( LEVEL_FATAL = iota LEVEL_ERROR LEVEL_WARN LEVEL_INFO LEVEL_DEBUG )
Variables ¶
This section is empty.
Functions ¶
func ChangeLogFMT ¶
func GetLogLevel ¶
func GetLogLevel() int
func GetLogLevelToString ¶
Types ¶
type LogWriter ¶
type LogWriter interface { Open(logPath string) error WriteString(s string) (n int, err error) Write([]byte) (n int, err error) Close() Flush() }
func MultiWriter ¶
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
func (*Logger) GetBinname ¶
func (*Logger) GetLogWriters ¶
type LoggerWriterConsole ¶
type LoggerWriterConsole struct { }
func NewLoggerWriterConsole ¶
func NewLoggerWriterConsole() *LoggerWriterConsole
func (*LoggerWriterConsole) Close ¶
func (l *LoggerWriterConsole) Close()
func (*LoggerWriterConsole) Flush ¶
func (l *LoggerWriterConsole) Flush()
func (*LoggerWriterConsole) Open ¶
func (l *LoggerWriterConsole) Open(logPath string) error
func (*LoggerWriterConsole) Write ¶
func (l *LoggerWriterConsole) Write(b []byte) (n int, err error)
func (*LoggerWriterConsole) WriteString ¶
func (l *LoggerWriterConsole) WriteString(s string) (n int, err error)
type LoggerWriterFile ¶
type LoggerWriterFile struct {
// contains filtered or unexported fields
}
func NewLoggerWriterFile ¶
func NewLoggerWriterFile() *LoggerWriterFile
func (*LoggerWriterFile) Close ¶
func (l *LoggerWriterFile) Close()
func (*LoggerWriterFile) Flush ¶
func (l *LoggerWriterFile) Flush()
func (*LoggerWriterFile) Open ¶
func (l *LoggerWriterFile) Open(logPath string) error
func (*LoggerWriterFile) WriteString ¶
func (l *LoggerWriterFile) WriteString(s string) (n int, err error)
Click to show internal directories.
Click to hide internal directories.