MCPcopy
hub / github.com/OJ/gobuster / NewLogger

Function NewLogger

libgobuster/logger.go:19–28  ·  view source on GitHub ↗
(debug bool)

Source from the content-addressed store, hash-verified

17}
18
19func NewLogger(debug bool) *Logger {
20 return &Logger{
21 log: log.New(os.Stdout, "", 0),
22 errorLog: log.New(os.Stderr, color.New(color.FgRed).Sprint("[ERROR] "), 0),
23 debugLog: log.New(os.Stderr, color.New(color.FgBlue).Sprint("[DEBUG] "), 0),
24 warnLog: log.New(os.Stderr, color.New(color.FgYellow).Sprint("[WARN] "), 0),
25 infoLog: log.New(os.Stderr, color.New(color.FgCyan).Sprint("[INFO] "), 0),
26 debug: debug,
27 }
28}
29
30func (l Logger) Debug(v ...any) {
31 if !l.debug {

Callers 13

runFunction · 0.92
runFunction · 0.92
runFunction · 0.92
runFunction · 0.92
runFunction · 0.92
BenchmarkVhostModeFunction · 0.92
runFunction · 0.92
BenchmarkDirModeFunction · 0.92
runFunction · 0.92
TestRequestFunction · 0.85
BenchmarkRequestWitBodyFunction · 0.85

Calls

no outgoing calls

Tested by 6

BenchmarkVhostModeFunction · 0.74
BenchmarkDirModeFunction · 0.74
TestRequestFunction · 0.68
BenchmarkRequestWitBodyFunction · 0.68
BenchmarkNewHTTPClientFunction · 0.68