Documentation
¶
Overview ¶
Provides a simple logger for the SDK.
Index ¶
- Constants
- func CloseLog()
- func SetLogFile(logFile string, verbose bool)
- func SetLogLevel(lvl int)
- func SyncLoggers(loggers []*Logger)
- type Logger
- func (l *Logger) Close()
- func (l *Logger) Debug(v ...interface{})
- func (l *Logger) Error(v ...interface{})
- func (l *Logger) Fatal(v ...interface{})
- func (l *Logger) Info(v ...interface{})
- func (l *Logger) Init(lvl int, prefix string)
- func (l *Logger) SetLevel(lvl int)
- func (l *Logger) SetLogFile(logFile io.Writer, verbose bool)
Constants ¶
View Source
const ( NONE = 0 FATAL = 1 ERROR = 2 INFO = 3 DEBUG = 4 )
Variables ¶
This section is empty.
Functions ¶
func SetLogFile ¶
SetLogFile - sets file path to write log verbose - true - console output; false - no console output
func SetLogLevel ¶
func SetLogLevel(lvl int)
SetLogLevel set the log level. lvl - 0 disabled; higher number (upto 4) more verbosity
func SyncLoggers ¶
func SyncLoggers(loggers []*Logger)
SyncLoggers syncs the loggers prefixes
- loggers is the list of loggers to sync
Types ¶
Click to show internal directories.
Click to hide internal directories.