Skip to content

Commit

Permalink
3.116.2 - add option to debug better (#2733)
Browse files Browse the repository at this point in the history
  • Loading branch information
aviramha authored Sep 5, 2024
1 parent a8ed16e commit e09d0e5
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 30 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,14 @@ This project uses [*towncrier*](https://towncrier.readthedocs.io/) and the chang

<!-- towncrier release notes start -->

## [3.116.2](https://github.com/metalbear-co/mirrord/tree/3.116.2) - 2024-09-05


### Changed

- Add option to have logs when running ext commands


## [3.116.1](https://github.com/metalbear-co/mirrord/tree/3.116.1) - 2024-09-04


Expand Down
56 changes: 28 additions & 28 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ resolver = "2"

# latest commits on rustls suppress certificate verification
[workspace.package]
version = "3.116.1"
version = "3.116.2"
edition = "2021"
license = "MIT"
readme = "README.md"
Expand Down
8 changes: 7 additions & 1 deletion mirrord/cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -539,10 +539,16 @@ fn main() -> miette::Result<()> {

let (signal, watch) = drain::channel();

// There are situations where even if running "ext" commands that shouldn't log, we want those
// to log to be able to debug issues.
let force_log = std::env::var("MIRRORD_FORCE_LOG")
.map(|s| s.parse().unwrap_or(false))
.unwrap_or(false);

let res: Result<(), CliError> = rt.block_on(async move {
if let Ok(console_addr) = std::env::var("MIRRORD_CONSOLE_ADDR") {
mirrord_console::init_async_logger(&console_addr, watch.clone(), 124).await?;
} else if !init_ext_error_handler(&cli.commands) {
} else if force_log || !init_ext_error_handler(&cli.commands) {
registry()
.with(fmt::layer().with_writer(std::io::stderr))
.with(EnvFilter::from_default_env())
Expand Down

0 comments on commit e09d0e5

Please sign in to comment.