From c420145c2eafd68f5e73b3ccadb8f442ecc878bf Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Wed, 3 Jan 2024 19:33:13 -0600 Subject: use 'go.wit.com/log' Signed-off-by: Jeff Carr --- unix.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'unix.go') diff --git a/unix.go b/unix.go index 722ec82..b09481a 100644 --- a/unix.go +++ b/unix.go @@ -5,7 +5,6 @@ package main import ( - "log" "os" "os/exec" "net" @@ -13,6 +12,7 @@ import ( "fmt" "strings" + "go.wit.com/log" "go.wit.com/shell" ) @@ -28,8 +28,8 @@ func Escalate() { cmd.Stderr = os.Stderr err := cmd.Run() if err != nil { - debug(LogError, "exit in Escalate()") - exit(err) + log.Error(err, "exit in Escalate()") + log.Exit(err) } } } @@ -50,7 +50,7 @@ func DumpPublicDNSZone(zone string) { func dumpIPs(host string) { ips, err := net.LookupIP(host) if err != nil { - debug(LogError, "dumpIPs() failed:", err) + log.Error(err, "dumpIPs() failed") } for _, ip := range ips { log.Println(host, ip) @@ -91,7 +91,7 @@ func run(s string) string { tmp := shell.Chomp(out.String()) // Output the results - debug(LogExec, "Command Output:", tmp) + log.Info("Command Output:", tmp) return tmp } -- cgit v1.2.3