Documentation ¶
Index ¶
- Constants
- Variables
- func Debug(stdout bool, msg string)
- func Debugf(stdout bool, msg string, args ...interface{})
- func Error(stdout bool, msg string)
- func Errorf(stdout bool, msg string, args ...interface{})
- func Fatal(stdout bool, msg string)
- func Fatalf(stdout bool, msg string, args ...interface{})
- func HandleWarningMessages(stdout bool, warnings []string)
- func Info(stdout bool, msg string)
- func Infof(stdout bool, msg string, args ...interface{})
- func Initialize(mr bool, logLevel string, c int)
- func Warning(stdout bool, msg string)
- func Warningf(stdout bool, msg string, args ...interface{})
- type CustomWriter
- type LogInfo
- type LogWriter
- type OutMessage
- type Writer
Constants ¶
const ( // CLI indicates gauge is used as a CLI. CLI = iota // API indicates gauge is in daemon mode. Used in IDEs. API // LSP indicates that gauge is acting as an LSP server. LSP )
Variables ¶
var ActiveLogFile string
ActiveLogFile log file represents the file which will be used for the backend logging
Functions ¶
func Debug ¶ added in v0.3.0
Debug logs DEBUG messages. stdout flag indicates if message is to be written to stdout in addition to log.
func Debugf ¶ added in v0.9.0
Debugf logs DEBUG messages. stdout flag indicates if message is to be written to stdout in addition to log.
func Error ¶ added in v0.3.0
Error logs ERROR messages. stdout flag indicates if message is to be written to stdout in addition to log.
func Errorf ¶ added in v0.3.2
Errorf logs ERROR messages. stdout flag indicates if message is to be written to stdout in addition to log.
func Fatal ¶ added in v0.3.0
Fatal logs CRITICAL messages and exits. stdout flag indicates if message is to be written to stdout in addition to log.
func Fatalf ¶ added in v0.3.2
Fatalf logs CRITICAL messages and exits. stdout flag indicates if message is to be written to stdout in addition to log.
func HandleWarningMessages ¶ added in v0.1.7
HandleWarningMessages logs multiple messages in WARNING mode
func Info ¶ added in v0.3.0
Info logs INFO messages. stdout flag indicates if message is to be written to stdout in addition to log.
func Infof ¶ added in v0.9.0
Infof logs INFO messages. stdout flag indicates if message is to be written to stdout in addition to log.
func Initialize ¶
Initialize logger with given level
Types ¶
type CustomWriter ¶ added in v1.0.9
type CustomWriter struct {
// contains filtered or unexported fields
}
func NewCustomWriter ¶ added in v1.0.7
type OutMessage ¶ added in v1.0.6
OutMessage contains information for output log
func (*OutMessage) ToJSON ¶ added in v1.0.6
func (out *OutMessage) ToJSON() (string, error)
ToJSON converts OutMessage into JSON