Skip to content

Commit

Permalink
fix: Print logs to stderr (#107)
Browse files Browse the repository at this point in the history
  • Loading branch information
dadav authored May 7, 2024
1 parent 813bd86 commit b531a2f
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions pkg/utils/console_printer.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,16 @@ package utils

import (
"fmt"
"os"

"github.com/fatih/color"
)

var rbacToolPrefix = color.New(color.FgBlue).SprintFunc()
var lineMsg = color.New(color.FgHiWhite).SprintFunc()
var (
rbacToolPrefix = color.New(color.FgBlue).SprintFunc()
lineMsg = color.New(color.FgHiWhite).SprintFunc()
)

func ConsolePrinter(msg string) {
fmt.Println(rbacToolPrefix("[RAPID7-INSIGHTCLOUDSEC]"), lineMsg(msg))
fmt.Fprintln(os.Stderr, rbacToolPrefix("[RAPID7-INSIGHTCLOUDSEC]"), lineMsg(msg))
}

0 comments on commit b531a2f

Please sign in to comment.