mirror of
https://github.com/projectdiscovery/nuclei.git
synced 2025-12-18 16:15:26 +00:00
* use parsed options while signing * update project layout to v3 * fix .gitignore * remove example template * misc updates * bump tlsx version * hide template sig warning with env * js: retain value while using log * fix nil pointer derefernce * misc doc update --------- Co-authored-by: sandeep <8293321+ehsandeep@users.noreply.github.com>
32 lines
625 B
Go
32 lines
625 B
Go
package goconsole
|
|
|
|
import (
|
|
"github.com/dop251/goja_nodejs/console"
|
|
"github.com/projectdiscovery/gologger"
|
|
)
|
|
|
|
var _ console.Printer = &GoConsolePrinter{}
|
|
|
|
// GoConsolePrinter is a console printer for nuclei using gologger
|
|
type GoConsolePrinter struct {
|
|
logger *gologger.Logger
|
|
}
|
|
|
|
func NewGoConsolePrinter() *GoConsolePrinter {
|
|
return &GoConsolePrinter{
|
|
logger: gologger.DefaultLogger,
|
|
}
|
|
}
|
|
|
|
func (p *GoConsolePrinter) Log(msg string) {
|
|
p.logger.Info().Msg(msg)
|
|
}
|
|
|
|
func (p *GoConsolePrinter) Warn(msg string) {
|
|
p.logger.Warning().Msg(msg)
|
|
}
|
|
|
|
func (p *GoConsolePrinter) Error(msg string) {
|
|
p.logger.Error().Msg(msg)
|
|
}
|