Skip to content

Commit

Permalink
chores: Rename SNITCH_LOG to BANSHEE_LOG
Browse files Browse the repository at this point in the history
closes #4
  • Loading branch information
howjmay committed Feb 21, 2024
1 parent 91f09d6 commit 3a97fa4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ LOG_TOTAL ?= /tmp/banshee_tests_total
TARGET_DIR ?= $(shell cargo metadata --format-version 1 | sed -n 's/.*"target_directory":"\([^"]*\)".*/\1/p')
BANSHEE ?= $(TARGET_DIR)/debug/banshee

SNITCH_LOG ?= info
BANSHEE_LOG ?= info

test: test-info $(TEST_TARGETS)
@echo
Expand Down Expand Up @@ -51,7 +51,7 @@ define test_template
echo -n "$$CMD ... "; \
if [ ! -z $(filter $(1),$(TESTS_BLACKLIST)) ]; then \
echo "`tput setaf 3`ignored`tput sgr0`"; \
elif ! env SNITCH_LOG=$(SNITCH_LOG) $$CMD &> $$LOGFILE; then \
elif ! env BANSHEE_LOG=$(BANSHEE_LOG) $$CMD &> $$LOGFILE; then \
echo "`tput setaf 1`FAILED`tput sgr0`"; \
cat $$LOGFILE; \
echo $$CMD >>$(LOG_FAILED); \
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ Run a binary as follows:

If you make any changes to `src/runtime.rs` or the `../riscv-opcodes`, run `make` to update the `src/runtime.ll` and `src/riscv.rs` files.

To enable logging output, set the `SNITCH_LOG` environment variable to `error`, `warn`, `info`, `debug`, or `trace`. More detailed [configurations](https://docs.rs/env_logger) are possible.
To enable logging output, set the `BANSHEE_LOG` environment variable to `error`, `warn`, `info`, `debug`, or `trace`. More detailed [configurations](https://docs.rs/env_logger) are possible.

For larger executable you might encounter segmentation faults due to an insufficient stack size. To increase the stack size of the emulation threads set the `RUST_MIN_STACK` environment variable to the desired number of bytes (default is 2MiB). ([More Information](https://doc.rust-lang.org/std/thread/#stack-size))

Expand Down Expand Up @@ -117,7 +117,7 @@ Piping the output into `sort` will cause the trace to be sorted by cycle and har
00000005 0005 80010010 x5:20000028 […] # sw a0, 0(t0)
00000006 0005 80010014 # wfi (args unknown)

**Caution:** Piping the stdout through `spike-dasm` can cause the instruction trace to look delayed with respect to debug and trace logs (which run through stderr), if you have them enabled in `SNITCH_LOG`. This is just a visual artifact.
**Caution:** Piping the stdout through `spike-dasm` can cause the instruction trace to look delayed with respect to debug and trace logs (which run through stderr), if you have them enabled in `BANSHEE_LOG`. This is just a visual artifact.

### Unit Tests

Expand Down
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ fn main() -> Result<()> {
.get_matches();

// Configure the logger.
pretty_env_logger::init_custom_env("SNITCH_LOG");
pretty_env_logger::init_custom_env("BANSHEE_LOG");

// Initialize the LLVM core.
let context = unsafe {
Expand Down

0 comments on commit 3a97fa4

Please sign in to comment.