Skip to content

Commit 17f8934

Browse files
committed
Update Makefile: add LOG_LEVEL variable and improve run target logging configuration
1 parent 37e4cdf commit 17f8934

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Makefile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ SHELL := bash
66
CARGO := cargo
77
PYTHON := python3
88
PROCESS_PKG := acropolis_process_omnibus
9+
LOG_LEVEL ?= info
10+
911

1012
# Test snapshots
1113
SNAPSHOT_SMALL ?= tests/fixtures/snapshot-small.cbor
@@ -38,9 +40,11 @@ help:
3840
@echo ""
3941
@echo "Variables:"
4042
@echo " SNAPSHOT=<path> Path to snapshot file (default: Conway epoch 507)"
43+
@echo " LOG_LEVEL=<level> Set log level (default: info, options: error, warn, info, debug, trace)"
4144
@echo ""
4245
@echo "Examples:"
4346
@echo " make snap-test-streaming"
47+
@echo " make run LOG_LEVEL=debug"
4448
@echo " make snap-test-streaming SNAPSHOT=path/to/snapshot.cbor"
4549

4650
all: fmt clippy test
@@ -52,7 +56,7 @@ test:
5256
$(CARGO) test
5357

5458
run:
55-
cd processes/omnibus && $(CARGO) run --release --bin $(PROCESS_PKG)
59+
cd processes/omnibus && RUST_LOG=$(LOG_LEVEL) $(CARGO) run --release --bin $(PROCESS_PKG)
5660

5761
fmt:
5862
$(CARGO) fmt --all

0 commit comments

Comments
 (0)