mirror of
https://github.com/gravitl/netmaker.git
synced 2025-10-05 16:57:51 +08:00
replace ncutil.Log/PrintLog with logger.Log
This commit is contained in:

committed by
0xdcarns

parent
28efa45419
commit
11b1098390
@@ -4,6 +4,8 @@ import (
|
||||
"fmt"
|
||||
"os/exec"
|
||||
"strings"
|
||||
|
||||
"github.com/gravitl/netmaker/logger"
|
||||
)
|
||||
|
||||
// RunCmd - runs a local command
|
||||
@@ -13,8 +15,8 @@ func RunCmd(command string, printerr bool) (string, error) {
|
||||
cmd.Wait()
|
||||
out, err := cmd.CombinedOutput()
|
||||
if err != nil && printerr {
|
||||
Log(fmt.Sprintf("error running command: %s", command))
|
||||
Log(strings.TrimSuffix(string(out), "\n"))
|
||||
logger.Log(0, fmt.Sprintf("error running command: %s", command))
|
||||
logger.Log(0, strings.TrimSuffix(string(out), "\n"))
|
||||
}
|
||||
return string(out), err
|
||||
}
|
||||
@@ -28,5 +30,3 @@ func RunCmdFormatted(command string, printerr bool) (string, error) {
|
||||
func GetEmbedded() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user