Documentation
¶
Index ¶
- Constants
- Variables
- type Logger
- func (l *Logger) Close() error
- func (l *Logger) Crit(format string, args ...interface{})
- func (l *Logger) Debug(format string, args ...interface{})
- func (l *Logger) Error(format string, args ...interface{})
- func (l *Logger) Info(format string, args ...interface{})
- func (l *Logger) Warn(format string, args ...interface{})
Constants ¶
View Source
const ( // Log Level Emerg = 0 Alert = 1 Crit = 2 Error = 3 Warn = 4 Notic = 5 Info = 6 Debug = 7 )
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
A Logger represents an active logging object that generates lines of output to an io.Writer. Each logging operation makes a single call to the Writer's Write method. A Logger can be used simultaneously from multiple goroutines; it guarantees to serialize access to the Writer.
func New ¶
New creates a new Logger. The out variable sets the destination to which log data will be written. The prefix appears at the beginning of each generated log line. The file argument defines the write log file path. if any error the os.Stdout will return
Click to show internal directories.
Click to hide internal directories.