Skip to content

Commit

Permalink
change: change all tracing levels to trace to reduce verbosity (#2176)
Browse files Browse the repository at this point in the history
  • Loading branch information
gbj authored Jan 13, 2024
1 parent 1eaf886 commit d71fead
Show file tree
Hide file tree
Showing 24 changed files with 68 additions and 68 deletions.
26 changes: 13 additions & 13 deletions integrations/axum/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ pub type PinnedHtmlStream =
/// - [ResponseOptions]
/// - [MetaContext](leptos_meta::MetaContext)
/// - [RouterIntegrationContext](leptos_router::RouterIntegrationContext)
#[tracing::instrument(level = "info", fields(error), skip_all)]
#[tracing::instrument(level = "trace", fields(error), skip_all)]
pub fn render_app_to_stream<IV>(
options: LeptosOptions,
app_fn: impl Fn() -> IV + Clone + Send + 'static,
Expand All @@ -483,7 +483,7 @@ where
/// The difference between calling this and `render_app_to_stream_with_context()` is that this
/// one respects the `SsrMode` on each Route and thus requires `Vec<RouteListing>` for route checking.
/// This is useful if you are using `.leptos_routes_with_handler()`
#[tracing::instrument(level = "info", fields(error), skip_all)]
#[tracing::instrument(level = "trace", fields(error), skip_all)]
pub fn render_route<IV>(
options: LeptosOptions,
paths: Vec<RouteListing>,
Expand Down Expand Up @@ -558,7 +558,7 @@ where
/// - [ResponseOptions]
/// - [MetaContext](leptos_meta::MetaContext)
/// - [RouterIntegrationContext](leptos_router::RouterIntegrationContext)
#[tracing::instrument(level = "info", fields(error), skip_all)]
#[tracing::instrument(level = "trace", fields(error), skip_all)]
pub fn render_app_to_stream_in_order<IV>(
options: LeptosOptions,
app_fn: impl Fn() -> IV + Clone + Send + 'static,
Expand Down Expand Up @@ -604,7 +604,7 @@ where
/// - [ResponseOptions]
/// - [MetaContext](leptos_meta::MetaContext)
/// - [RouterIntegrationContext](leptos_router::RouterIntegrationContext)
#[tracing::instrument(level = "info", fields(error), skip_all)]
#[tracing::instrument(level = "trace", fields(error), skip_all)]
pub fn render_app_to_stream_with_context<IV>(
options: LeptosOptions,
additional_context: impl Fn() + 'static + Clone + Send,
Expand Down Expand Up @@ -636,7 +636,7 @@ where
/// The difference between calling this and `render_app_to_stream_with_context()` is that this
/// one respects the `SsrMode` on each Route, and thus requires `Vec<RouteListing>` for route checking.
/// This is useful if you are using `.leptos_routes_with_handler()`.
#[tracing::instrument(level = "info", fields(error), skip_all)]
#[tracing::instrument(level = "trace", fields(error), skip_all)]
pub fn render_route_with_context<IV>(
options: LeptosOptions,
paths: Vec<RouteListing>,
Expand Down Expand Up @@ -724,7 +724,7 @@ where
/// - [ResponseOptions]
/// - [MetaContext](leptos_meta::MetaContext)
/// - [RouterIntegrationContext](leptos_router::RouterIntegrationContext)
#[tracing::instrument(level = "info", fields(error), skip_all)]
#[tracing::instrument(level = "trace", fields(error), skip_all)]
pub fn render_app_to_stream_with_context_and_replace_blocks<IV>(
options: LeptosOptions,
additional_context: impl Fn() + 'static + Clone + Send,
Expand Down Expand Up @@ -787,7 +787,7 @@ where
}
}

#[tracing::instrument(level = "info", fields(error), skip_all)]
#[tracing::instrument(level = "trace", fields(error), skip_all)]
async fn generate_response(
res_options: ResponseOptions,
rx: Receiver<String>,
Expand Down Expand Up @@ -829,7 +829,7 @@ async fn generate_response(
}
res
}
#[tracing::instrument(level = "info", fields(error), skip_all)]
#[tracing::instrument(level = "trace", fields(error), skip_all)]
async fn forward_stream(
options: &LeptosOptions,
res_options2: ResponseOptions,
Expand Down Expand Up @@ -890,7 +890,7 @@ async fn forward_stream(
/// - [ResponseOptions]
/// - [MetaContext](leptos_meta::MetaContext)
/// - [RouterIntegrationContext](leptos_router::RouterIntegrationContext)
#[tracing::instrument(level = "info", fields(error), skip_all)]
#[tracing::instrument(level = "trace", fields(error), skip_all)]
pub fn render_app_to_stream_in_order_with_context<IV>(
options: LeptosOptions,
additional_context: impl Fn() + 'static + Clone + Send,
Expand Down Expand Up @@ -1026,7 +1026,7 @@ fn provide_contexts(
/// - [ResponseOptions]
/// - [MetaContext](leptos_meta::MetaContext)
/// - [RouterIntegrationContext](leptos_router::RouterIntegrationContext)
#[tracing::instrument(level = "info", fields(error), skip_all)]
#[tracing::instrument(level = "trace", fields(error), skip_all)]
pub fn render_app_async<IV>(
options: LeptosOptions,
app_fn: impl Fn() -> IV + Clone + Send + 'static,
Expand Down Expand Up @@ -1068,7 +1068,7 @@ where
/// - [ResponseOptions]
/// - [MetaContext](leptos_meta::MetaContext)
/// - [RouterIntegrationContext](leptos_router::RouterIntegrationContext)
#[tracing::instrument(level = "info", fields(error), skip_all)]
#[tracing::instrument(level = "trace", fields(error), skip_all)]
pub fn render_app_async_stream_with_context<IV>(
options: LeptosOptions,
additional_context: impl Fn() + 'static + Clone + Send,
Expand Down Expand Up @@ -1204,7 +1204,7 @@ where
/// - [ResponseOptions]
/// - [MetaContext](leptos_meta::MetaContext)
/// - [RouterIntegrationContext](leptos_router::RouterIntegrationContext)
#[tracing::instrument(level = "info", fields(error), skip_all)]
#[tracing::instrument(level = "trace", fields(error), skip_all)]
pub fn render_app_async_with_context<IV>(
options: LeptosOptions,
additional_context: impl Fn() + 'static + Clone + Send,
Expand Down Expand Up @@ -1677,7 +1677,7 @@ where
LeptosOptions: FromRef<S>,
S: Clone + Send + Sync + 'static,
{
#[tracing::instrument(level = "info", fields(error), skip_all)]
#[tracing::instrument(level = "trace", fields(error), skip_all)]
fn leptos_routes<IV>(
self,
options: &S,
Expand Down
2 changes: 1 addition & 1 deletion leptos/src/animated_show.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ use leptos_reactive::{
/// ```
#[cfg_attr(
any(debug_assertions, feature = "ssr"),
tracing::instrument(level = "info", skip_all)
tracing::instrument(level = "trace", skip_all)
)]
#[component]
pub fn AnimatedShow(
Expand Down
2 changes: 1 addition & 1 deletion leptos/src/for_loop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ use std::hash::Hash;
/// ```
#[cfg_attr(
any(debug_assertions, feature = "ssr"),
tracing::instrument(level = "info", skip_all)
tracing::instrument(level = "trace", skip_all)
)]
#[component(transparent)]
pub fn For<IF, I, T, EF, N, KF, K>(
Expand Down
2 changes: 1 addition & 1 deletion leptos/src/portal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use leptos_macro::component;
/// Setting `use_shadow` to `true` places the element in a shadow root to isolate styles.
#[cfg_attr(
any(debug_assertions, feature = "ssr"),
tracing::instrument(level = "info", skip_all)
tracing::instrument(level = "trace", skip_all)
)]
#[component]
pub fn Portal(
Expand Down
2 changes: 1 addition & 1 deletion leptos/src/show.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ use leptos_reactive::{create_memo, signal_prelude::*};
/// ```
#[cfg_attr(
any(debug_assertions, feature = "ssr"),
tracing::instrument(level = "info", skip_all)
tracing::instrument(level = "trace", skip_all)
)]
#[component]
pub fn Show<W>(
Expand Down
2 changes: 1 addition & 1 deletion leptos/src/suspense_component.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ use std::rc::Rc;
/// ```
#[cfg_attr(
any(debug_assertions, feature = "ssr"),
tracing::instrument(level = "info", skip_all)
tracing::instrument(level = "trace", skip_all)
)]
#[component]
pub fn Suspense<V>(
Expand Down
2 changes: 1 addition & 1 deletion leptos/src/transition.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ use std::{
/// ```
#[cfg_attr(
any(debug_assertions, feature = "ssr"),
tracing::instrument(level = "info", skip_all)
tracing::instrument(level = "trace", skip_all)
)]
#[component(transparent)]
pub fn Transition(
Expand Down
2 changes: 1 addition & 1 deletion leptos_dom/src/components.rs
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ impl From<ComponentRepr> for View {
}

impl IntoView for ComponentRepr {
#[cfg_attr(any(debug_assertions, feature = "ssr"), instrument(level = "info", name = "<Component />", skip_all, fields(name = %self.name)))]
#[cfg_attr(any(debug_assertions, feature = "ssr"), instrument(level = "trace", name = "<Component />", skip_all, fields(name = %self.name)))]
fn into_view(self) -> View {
self.into()
}
Expand Down
2 changes: 1 addition & 1 deletion leptos_dom/src/components/dyn_child.rs
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ where
{
#[cfg_attr(
any(debug_assertions, feature = "ssr"),
instrument(level = "info", name = "<DynChild />", skip_all)
instrument(level = "trace", name = "<DynChild />", skip_all)
)]
#[inline]
fn into_view(self) -> View {
Expand Down
2 changes: 1 addition & 1 deletion leptos_dom/src/components/each.rs
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ where
{
#[cfg_attr(
any(debug_assertions, feature = "ssr"),
instrument(level = "info", name = "<Each />", skip_all)
instrument(level = "trace", name = "<Each />", skip_all)
)]
fn into_view(self) -> crate::View {
let Self {
Expand Down
4 changes: 2 additions & 2 deletions leptos_dom/src/components/fragment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ where
{
#[cfg_attr(
any(debug_assertions, feature = "ssr"),
instrument(level = "info", skip_all,)
instrument(level = "trace", skip_all,)
)]
fn into_fragment(self) -> Fragment {
self.into_iter().map(|v| v.into_view()).collect()
Expand Down Expand Up @@ -110,7 +110,7 @@ impl Fragment {
}

impl IntoView for Fragment {
#[cfg_attr(debug_assertions, instrument(level = "info", name = "</>", skip_all, fields(children = self.nodes.len())))]
#[cfg_attr(debug_assertions, instrument(level = "trace", name = "</>", skip_all, fields(children = self.nodes.len())))]
fn into_view(self) -> View {
self.into()
}
Expand Down
2 changes: 1 addition & 1 deletion leptos_dom/src/components/unit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ pub struct Unit;
impl IntoView for Unit {
#[cfg_attr(
any(debug_assertions, feature = "ssr"),
instrument(level = "info", name = "<() />", skip_all)
instrument(level = "trace", name = "<() />", skip_all)
)]
fn into_view(self) -> crate::View {
let component = UnitRepr::default();
Expand Down
26 changes: 13 additions & 13 deletions leptos_dom/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ pub trait Mountable {
impl IntoView for () {
#[cfg_attr(
any(debug_assertions, feature = "ssr"),
instrument(level = "info", name = "<() />", skip_all)
instrument(level = "trace", name = "<() />", skip_all)
)]
fn into_view(self) -> View {
Unit.into_view()
Expand All @@ -114,7 +114,7 @@ where
{
#[cfg_attr(
any(debug_assertions, feature = "ssr"),
instrument(level = "info", name = "Option<T>", skip_all)
instrument(level = "trace", name = "Option<T>", skip_all)
)]
fn into_view(self) -> View {
if let Some(t) = self {
Expand All @@ -132,7 +132,7 @@ where
{
#[cfg_attr(
any(debug_assertions, feature = "ssr"),
instrument(level = "info", name = "Fn() -> impl IntoView", skip_all)
instrument(level = "trace", name = "Fn() -> impl IntoView", skip_all)
)]
#[track_caller]
fn into_view(self) -> View {
Expand Down Expand Up @@ -246,7 +246,7 @@ pub trait CollectView {
impl<I: IntoIterator<Item = T>, T: IntoView> CollectView for I {
#[cfg_attr(
any(debug_assertions, feature = "ssr"),
instrument(level = "info", name = "#text", skip_all)
instrument(level = "trace", name = "#text", skip_all)
)]
fn collect_view(self) -> View {
self.into_iter()
Expand Down Expand Up @@ -381,7 +381,7 @@ impl Element {
}

impl IntoView for Element {
#[cfg_attr(debug_assertions, instrument(level = "info", name = "<Element />", skip_all, fields(tag = %self.name)))]
#[cfg_attr(debug_assertions, instrument(level = "trace", name = "<Element />", skip_all, fields(tag = %self.name)))]
fn into_view(self) -> View {
View::Element(self)
}
Expand Down Expand Up @@ -501,7 +501,7 @@ impl fmt::Debug for Text {
}

impl IntoView for Text {
#[cfg_attr(debug_assertions, instrument(level = "info", name = "#text", skip_all, fields(content = %self.content)))]
#[cfg_attr(debug_assertions, instrument(level = "trace", name = "#text", skip_all, fields(content = %self.content)))]
fn into_view(self) -> View {
View::Text(self)
}
Expand Down Expand Up @@ -566,7 +566,7 @@ impl Default for View {
}

impl IntoView for View {
#[cfg_attr(debug_assertions, instrument(level = "info", name = "Node", skip_all, fields(kind = self.kind_name())))]
#[cfg_attr(debug_assertions, instrument(level = "trace", name = "Node", skip_all, fields(kind = self.kind_name())))]
fn into_view(self) -> View {
self
}
Expand All @@ -581,7 +581,7 @@ impl IntoView for &View {
impl<const N: usize> IntoView for [View; N] {
#[cfg_attr(
any(debug_assertions, feature = "ssr"),
instrument(level = "info", name = "[Node; N]", skip_all)
instrument(level = "trace", name = "[Node; N]", skip_all)
)]
fn into_view(self) -> View {
Fragment::new(self.into_iter().collect()).into_view()
Expand Down Expand Up @@ -1135,7 +1135,7 @@ api_planning! {
impl IntoView for String {
#[cfg_attr(
any(debug_assertions, feature = "ssr"),
instrument(level = "info", name = "#text", skip_all)
instrument(level = "trace", name = "#text", skip_all)
)]
#[inline(always)]
fn into_view(self) -> View {
Expand All @@ -1146,7 +1146,7 @@ impl IntoView for String {
impl IntoView for &'static str {
#[cfg_attr(
any(debug_assertions, feature = "ssr"),
instrument(level = "info", name = "#text", skip_all)
instrument(level = "trace", name = "#text", skip_all)
)]
#[inline(always)]
fn into_view(self) -> View {
Expand All @@ -1157,7 +1157,7 @@ impl IntoView for &'static str {
impl IntoView for Oco<'static, str> {
#[cfg_attr(
any(debug_assertions, feature = "ssr"),
instrument(level = "info", name = "#text", skip_all)
instrument(level = "trace", name = "#text", skip_all)
)]
#[inline(always)]
fn into_view(self) -> View {
Expand All @@ -1171,7 +1171,7 @@ where
{
#[cfg_attr(
any(debug_assertions, feature = "ssr"),
instrument(level = "info", name = "#text", skip_all)
instrument(level = "trace", name = "#text", skip_all)
)]
fn into_view(self) -> View {
self.into_iter()
Expand All @@ -1184,7 +1184,7 @@ where
impl IntoView for core::fmt::Arguments<'_> {
#[cfg_attr(
any(debug_assertions, feature = "ssr"),
instrument(level = "info", name = "#text", skip_all)
instrument(level = "trace", name = "#text", skip_all)
)]
fn into_view(self) -> View {
match self.as_str() {
Expand Down
Loading

0 comments on commit d71fead

Please sign in to comment.