Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make sui CLI log file gated by env flag #12095

Merged
merged 3 commits into from
May 19, 2023
Merged

make sui CLI log file gated by env flag #12095

merged 3 commits into from
May 19, 2023

Conversation

oxade
Copy link
Contributor

@oxade oxade commented May 19, 2023

Description

Enable or disable logging to file with env SUI_CLI_LOG_FILE_ENABLE=1
Default is 0 (off) when var is unset.

Test Plan

Manual


If your changes are not user-facing and not a breaking change, you can skip the following section. Otherwise, please indicate what changed, and then add to the Release Notes section as highlighted during the release process.

Type of Change (Check all that apply)

  • user-visible impact
  • breaking change for a client SDKs
  • breaking change for FNs (FN binary must upgrade)
  • breaking change for validators or node operators (must upgrade binaries)
  • breaking change for on-chain data layout
  • necessitate either a data wipe or data migration

Release notes

@oxade oxade requested a review from damirka May 19, 2023 17:22
@vercel
Copy link

vercel bot commented May 19, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
offline-signer-helper ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 19, 2023 5:35pm
4 Ignored Deployments
Name Status Preview Comments Updated (UTC)
explorer ⬜️ Ignored (Inspect) May 19, 2023 5:35pm
explorer-storybook ⬜️ Ignored (Inspect) May 19, 2023 5:35pm
sui-wallet-kit ⬜️ Ignored (Inspect) May 19, 2023 5:35pm
wallet-adapter ⬜️ Ignored (Inspect) May 19, 2023 5:35pm

@oxade oxade changed the title make sui CLI log gated by env flag make sui CLI log file gated by env flag May 19, 2023
Copy link
Contributor

@damirka damirka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Finally! Thank you for this!

@oxade oxade enabled auto-merge (squash) May 19, 2023 17:28
@oxade oxade disabled auto-merge May 19, 2023 17:29
@oxade oxade enabled auto-merge (squash) May 19, 2023 17:35
@oxade oxade merged commit 8ff1005 into main May 19, 2023
@oxade oxade deleted the cli_log_file_env_gated branch May 19, 2023 18:00
amnn added a commit that referenced this pull request Jun 6, 2023
amnn added a commit that referenced this pull request Jun 6, 2023
## Description 

This reverts commit 8ff1005.

Following the previous fix, logs were showing up in terminal output even
when `RUST_LOG` was not enabled.

## Test Plan 

```
sui$ cargo build --bin sui
sui$ ./target/debug/sui client active-address
sui/crates/sui$ cargo nextest run 
```

---
If your changes are not user-facing and not a breaking change, you can
skip the following section. Otherwise, please indicate what changed, and
then add to the Release Notes section as highlighted during the release
process.

### Type of Change (Check all that apply)

- [ ] protocol change
- [x] user-visible impact
- [ ] breaking change for a client SDKs
- [ ] breaking change for FNs (FN binary must upgrade)
- [ ] breaking change for validators or node operators (must upgrade
binaries)
- [ ] breaking change for on-chain data layout
- [ ] necessitate either a data wipe or data migration

### Release notes

Revert behaviour where log output was controlled by an env flag, because
when it was gated off, logs started showing up in command-line output.
CLI now behaves as it did before: Producing a log file in the current
working directory, but not displaying logs in line under normal
operation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants