Settting up more verbose logging with calling function and timestamp
This commit is contained in:
parent
2813ab0e96
commit
93f577cae9
10
main.go
10
main.go
|
@ -13,6 +13,14 @@ import (
|
|||
"gitlab.dcso.lolcat/LABS/styx/models"
|
||||
)
|
||||
|
||||
func init() {
|
||||
// Setting up logging.
|
||||
logrus.SetFormatter(&logrus.TextFormatter{
|
||||
FullTimestamp: true,
|
||||
})
|
||||
logrus.SetReportCaller(true)
|
||||
}
|
||||
|
||||
func main() {
|
||||
fmt.Println("Starting to get data from the Internet...")
|
||||
|
||||
|
@ -101,7 +109,7 @@ func main() {
|
|||
// shodan
|
||||
client := shodan.NewEnvClient(nil)
|
||||
ch := make(chan *shodan.HostData)
|
||||
err := client.GetBannersByPorts(context.Background(), []int{80, 443}, ch)
|
||||
err := client.GetBannersByPorts(context.Background(), []int{80, 443, 8443, 53}, ch)
|
||||
if err != nil {
|
||||
logrus.Error(err)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue