Documentation ¶
Index ¶
- type Logger
- func (l *Logger) Debug(level uint8, v ...interface{})
- func (l *Logger) Debugf(level uint8, format string, v ...interface{})
- func (l *Logger) Debugln(level uint8, v ...interface{})
- func (l *Logger) Fatal(v ...interface{})
- func (l *Logger) Fatalf(format string, v ...interface{})
- func (l *Logger) Fatalln(v ...interface{})
- func (l *Logger) Flush() error
- func (l *Logger) GetLevel() int16
- func (l *Logger) Panic(v ...interface{})
- func (l *Logger) Panicf(format string, v ...interface{})
- func (l *Logger) Panicln(v ...interface{})
- func (l *Logger) Print(v ...interface{})
- func (l *Logger) Printf(format string, v ...interface{})
- func (l *Logger) Println(v ...interface{})
- func (l *Logger) SetAccessChecker(accessChecker func(method string, authInfo *srpc.AuthInformation) bool)
- func (l *Logger) SetLevel(maxLevel int16)
- func (l *Logger) WriteHtml(writer io.Writer)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
func New ¶
New will create a Logger which has an internal log buffer (see the lib/logbuf package). It implements the log.DebugLogger interface. By default, the max debug level is -1, meaning all debug logs are dropped (ignored). The name of the new logger is given by name. This name is used to remotely identify the logger for SRPC methods such as Logger.SetDebugLevel. The first or primary logger should be created with name "" (the empty string).
func NewWithFlags ¶
NewWithFlags will create a Logger which has an internal log buffer (see the lib/logbuf package). It implements the log.DebugLogger interface. By default, the max debug level is -1, meaning all debug logs are dropped (ignored). The name of the new logger is given by name. This name is used to remotely identify the logger for RPC methods such as Logger.SetDebugLevel. The first or primary logger should be created with name "" (the empty string).
func NewWithOptions ¶
NewWithOptions will create a Logger which has an internal log buffer (see the lib/logbuf package). It implements the log.DebugLogger interface. By default, the max debug level is -1, meaning all debug logs are dropped (ignored). The name of the new logger is given by name. This name is used to remotely identify the logger for RPC methods such as Logger.SetDebugLevel. The first or primary logger should be created with name "" (the empty string).
func (*Logger) Debug ¶
Debug will call the Print method if level is less than or equal to the max debug level for the Logger.
func (*Logger) Debugf ¶
Debugf will call the Printf method if level is less than or equal to the max debug level for the Logger.
func (*Logger) Debugln ¶
Debugln will call the Println method if level is less than or equal to the max debug level for the Logger.
func (*Logger) Fatal ¶
func (l *Logger) Fatal(v ...interface{})
Fatal is equivalent to Print() followed by a call to os.Exit(1).
func (*Logger) Fatalln ¶
func (l *Logger) Fatalln(v ...interface{})
Fatalln is equivalent to Println() followed by a call to os.Exit(1).
func (*Logger) Flush ¶
Flush flushes the open log file (if one is open). This should only be called just prior to process termination. The log file is automatically flushed after short periods of inactivity.
func (*Logger) Panic ¶
func (l *Logger) Panic(v ...interface{})
Panic is equivalent to Print() followed by a call to panic().
func (*Logger) Panicln ¶
func (l *Logger) Panicln(v ...interface{})
Panicln is equivalent to Println() followed by a call to panic().
func (*Logger) Print ¶
func (l *Logger) Print(v ...interface{})
Print prints to the logger. Arguments are handled in the manner of fmt.Print.
func (*Logger) Printf ¶
Printf prints to the logger. Arguments are handled in the manner of fmt.Printf.
func (*Logger) Println ¶
func (l *Logger) Println(v ...interface{})
Println prints to the logger. Arguments are handled in the manner of fmt.Println.
func (*Logger) SetAccessChecker ¶
func (l *Logger) SetAccessChecker( accessChecker func(method string, authInfo *srpc.AuthInformation) bool)
SetAccessChecker sets the function that is called when SRPC methods are called for the Logger. This allows the application to control which users or groups are permitted to remotely control the Logger.