cmd: use logrus to print error

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
Giuseppe Scrivano
2024-10-11 09:52:01 +02:00
parent 71d5ee0e04
commit 3d57560a21

View File

@ -2,8 +2,9 @@ package main
import ( import (
"fmt" "fmt"
"os"
"syscall" "syscall"
"github.com/sirupsen/logrus"
) )
func setRLimits() error { func setRLimits() error {
@ -25,7 +26,7 @@ func setUMask() {
func earlyInitHook() { func earlyInitHook() {
if err := setRLimits(); err != nil { if err := setRLimits(); err != nil {
fmt.Fprintf(os.Stderr, "Failed to set rlimits: %s\n", err.Error()) logrus.Errorf("Failed to set rlimits: %v", err)
} }
setUMask() setUMask()