From c081e3dff2190cc72ef1b4ab6f7d2fa3cdfbdf62 Mon Sep 17 00:00:00 2001 From: olegkubrakov Date: Thu, 16 Nov 2023 14:21:00 -0800 Subject: [PATCH] Change Lightspark Remote Signer to use tracing lib for logs. --- lightspark-remote-signing/Cargo.toml | 3 ++- lightspark-remote-signing/src/handler.rs | 2 +- lightspark-remote-signing/src/signer.rs | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lightspark-remote-signing/Cargo.toml b/lightspark-remote-signing/Cargo.toml index 1e3c239..888c64e 100644 --- a/lightspark-remote-signing/Cargo.toml +++ b/lightspark-remote-signing/Cargo.toml @@ -19,5 +19,6 @@ bitcoin = "0.30.1" hex = "0.4.3" rand_core = { "version" = "0.6.4", features = ["getrandom"] } serde_json = "1.0.104" -log = "0.4.20" serde = "1.0.183" +tracing = { version = "0.1", features = ["log"], default-features = false } +tracing-subscriber = "0.3" diff --git a/lightspark-remote-signing/src/handler.rs b/lightspark-remote-signing/src/handler.rs index 61445c3..03935b2 100644 --- a/lightspark-remote-signing/src/handler.rs +++ b/lightspark-remote-signing/src/handler.rs @@ -5,9 +5,9 @@ use lightspark::{ }, webhooks::WebhookEvent, }; -use log::info; use serde::Deserialize; use serde_json::from_value; +use tracing::info; use crate::{response::Response, signer::LightsparkSigner, validation::Validation, Error}; diff --git a/lightspark-remote-signing/src/signer.rs b/lightspark-remote-signing/src/signer.rs index 752a177..6c49460 100644 --- a/lightspark-remote-signing/src/signer.rs +++ b/lightspark-remote-signing/src/signer.rs @@ -8,8 +8,8 @@ use bitcoin::hashes::{sha512, Hash, HashEngine, Hmac, HmacEngine}; use bitcoin::secp256k1::ecdh::SharedSecret; use bitcoin::secp256k1::hashes::sha256; use bitcoin::secp256k1::{Message, PublicKey, Scalar, Secp256k1, SecretKey}; -use log::debug; use rand_core::{OsRng, RngCore}; +use tracing::debug; const NODE_KEY_PATH: &str = "m/0";