Skip to content

Commit

Permalink
Debug logs
Browse files Browse the repository at this point in the history
  • Loading branch information
catttam committed Oct 10, 2024
1 parent 75eae75 commit c3fbcda
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/handlers/job.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import (
"io"
"log"
"net/http"
"os"
"strconv"
"strings"

Expand All @@ -46,7 +47,8 @@ var (
// Don't restart jobs in order to keep logs
restartPolicy = v1.RestartPolicyNever
// command used for passing the event to faas-supervisor
command = []string{"/bin/sh"}
command = []string{"/bin/sh"}
jobLogger = log.New(os.Stdout, "[JOB-HANDLER] ", log.Flags())
)

const (
Expand Down Expand Up @@ -234,6 +236,7 @@ func MakeJobHandler(cfg *types.Config, kubeClientset *kubernetes.Clientset, back
}

// Create job
jobLogger.Printf("job definition: ", job)

Check failure on line 239 in pkg/handlers/job.go

View workflow job for this annotation

GitHub Actions / test

(*log.Logger).Printf call has arguments but no formatting directives
_, err = kubeClientset.BatchV1().Jobs(cfg.ServicesNamespace).Create(context.TODO(), job, metav1.CreateOptions{})
if err != nil {
c.String(http.StatusInternalServerError, err.Error())
Expand Down

0 comments on commit c3fbcda

Please sign in to comment.