Skip to content

Commit

Permalink
Let log level be supplied for make run
Browse files Browse the repository at this point in the history
It's useful to be able to run with debug logging, which you can do now
with:

    make run LOG_LEVEL=debug

As a companion change, logging from `make run` is now explicitly set
to console format, since the expectation is it will be run from a
console.

Signed-off-by: Michael Bridgen <[email protected]>
  • Loading branch information
squaremo committed Jun 22, 2021
1 parent a13bbb6 commit c798f55
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ endif

TEST_CRDS:=controllers/testdata/crds

# Log level for `make run`
LOG_LEVEL?=info

all: manager

# Running the tests requires the source.toolkit.fluxcd.io CRDs
Expand Down Expand Up @@ -49,7 +52,7 @@ manager: generate fmt vet

# Run against the configured Kubernetes cluster in ~/.kube/config
run: generate fmt vet manifests
go run ./main.go
go run ./main.go --log-level=${LOG_LEVEL} --log-encoding=console

# Install CRDs into a cluster
install: manifests
Expand Down

0 comments on commit c798f55

Please sign in to comment.