Compare commits

...

3 Commits

Author SHA1 Message Date
Tommy Verrall 01f52153bc Update ci-build-upload-binaries.yml
add features console
2025-07-23 11:12:48 +02:00
Tommy Verrall 18593539f6 Update ci-build-upload-binaries.yml 2025-07-22 16:56:26 +02:00
Tommy Verrall 2580676c76 add tokio console 2025-07-22 16:48:43 +02:00
4 changed files with 23 additions and 7 deletions
@@ -38,15 +38,14 @@ jobs:
rm -rf ci-builds || true
mkdir -p $OUTPUT_DIR
echo $OUTPUT_DIR
- name: Install Dependencies (Linux)
run: sudo apt-get update && sudo apt-get -y install libudev-dev
- name: Sets env vars for tokio if set in manual dispatch inputs
run: |
echo 'RUSTFLAGS="--cfg tokio_unstable"' >> $GITHUB_ENV
if: github.event_name == 'workflow_dispatch' && inputs.add_tokio_unstable == true
run: |
echo "RUSTFLAGS=--cfg tokio_unstable" >> $GITHUB_ENV
echo "CARGO_FEATURES=--features console" >> $GITHUB_ENV
- name: Install Rust stable
uses: actions-rs/toolchain@v1
with:
@@ -103,7 +102,6 @@ jobs:
if [ ${{ github.event_name == 'workflow_dispatch' && inputs.enable_deb == true }} = true ]; then
cp target/debian/*.deb $OUTPUT_DIR
fi
- name: Deploy branch to CI www
continue-on-error: true
uses: easingthemes/ssh-deploy@main
Generated
+1
View File
@@ -6617,6 +6617,7 @@ dependencies = [
"chacha",
"clap",
"colored",
"console-subscriber",
"criterion",
"csv",
"cupid",
+4
View File
@@ -38,6 +38,7 @@ tracing-indicatif = { workspace = true }
tracing-subscriber.workspace = true
tokio = { workspace = true, features = ["macros", "sync", "rt-multi-thread"] }
tokio-util = { workspace = true, features = ["codec"] }
console-subscriber = { workspace = true, optional = true }
toml = { workspace = true }
url = { workspace = true, features = ["serde"] }
zeroize = { workspace = true, features = ["zeroize_derive"] }
@@ -123,6 +124,9 @@ harness = false
# temporary bonding information v1 (to grab and parse nym-mixnode and nym-gateway package versions)
cargo_metadata = { workspace = true }
[features]
console = ["console-subscriber"]
[dev-dependencies]
criterion = { workspace = true, features = ["async_tokio"] }
rand_chacha = { workspace = true }
+15 -2
View File
@@ -6,6 +6,9 @@ use tracing_subscriber::filter::Directive;
use tracing_subscriber::layer::SubscriberExt;
use tracing_subscriber::util::SubscriberInitExt;
#[cfg(feature = "console")]
use console_subscriber;
pub(crate) fn granual_filtered_env() -> anyhow::Result<tracing_subscriber::filter::EnvFilter> {
fn directive_checked(directive: impl Into<String>) -> anyhow::Result<Directive> {
directive.into().parse().map_err(From::from)
@@ -22,9 +25,19 @@ pub(crate) fn granual_filtered_env() -> anyhow::Result<tracing_subscriber::filte
}
pub(crate) fn build_tracing_logger() -> anyhow::Result<impl SubscriberExt> {
Ok(tracing_subscriber::registry()
let registry = tracing_subscriber::registry()
.with(default_tracing_fmt_layer(std::io::stderr))
.with(granual_filtered_env()?))
.with(granual_filtered_env()?);
#[cfg(feature = "console")]
{
Ok(registry.with(console_subscriber::spawn()))
}
#[cfg(not(feature = "console"))]
{
Ok(registry)
}
}
pub(crate) fn setup_tracing_logger() -> anyhow::Result<()> {