server: migrate all use of log to tracing

This commit is contained in:
Bill Thiede 2025-04-23 15:25:11 -07:00
parent c7c47e4a73
commit f11f0b4d23
6 changed files with 4 additions and 9 deletions

1
Cargo.lock generated
View File

@ -3083,7 +3083,6 @@ dependencies = [
"letterbox-notmuch 0.17.18", "letterbox-notmuch 0.17.18",
"letterbox-shared 0.17.18", "letterbox-shared 0.17.18",
"linkify", "linkify",
"log",
"lol_html", "lol_html",
"mailparse", "mailparse",
"maplit", "maplit",

View File

@ -30,7 +30,6 @@ html-escape = "0.2.13"
letterbox-notmuch = { path = "../notmuch", version = "0.17.18", registry = "xinu" } letterbox-notmuch = { path = "../notmuch", version = "0.17.18", registry = "xinu" }
letterbox-shared = { path = "../shared", version = "0.17.18", registry = "xinu" } letterbox-shared = { path = "../shared", version = "0.17.18", registry = "xinu" }
linkify = "0.10.0" linkify = "0.10.0"
log = "0.4.27"
lol_html = "2.3.0" lol_html = "2.3.0"
mailparse = "0.16.1" mailparse = "0.16.1"
maplit = "1.0.2" maplit = "1.0.2"

View File

@ -9,11 +9,10 @@ use async_graphql::{
use cacher::FilesystemCacher; use cacher::FilesystemCacher;
use futures::stream; use futures::stream;
use letterbox_notmuch::Notmuch; use letterbox_notmuch::Notmuch;
use log::info;
use serde::{Deserialize, Serialize}; use serde::{Deserialize, Serialize};
use sqlx::postgres::PgPool; use sqlx::postgres::PgPool;
use tokio::join; use tokio::join;
use tracing::instrument; use tracing::{info, instrument};
#[cfg(feature = "tantivy")] #[cfg(feature = "tantivy")]
use crate::tantivy::TantivyConnection; use crate::tantivy::TantivyConnection;

View File

@ -21,7 +21,6 @@ use cacher::{Cacher, FilesystemCacher};
use css_inline::{CSSInliner, InlineError, InlineOptions}; use css_inline::{CSSInliner, InlineError, InlineOptions};
pub use error::ServerError; pub use error::ServerError;
use linkify::{LinkFinder, LinkKind}; use linkify::{LinkFinder, LinkKind};
use log::{debug, error, info, warn};
use lol_html::{ use lol_html::{
element, errors::RewritingError, html_content::ContentType, rewrite_str, text, element, errors::RewritingError, html_content::ContentType, rewrite_str, text,
RewriteStrSettings, RewriteStrSettings,
@ -32,6 +31,7 @@ use reqwest::StatusCode;
use scraper::{Html, Selector}; use scraper::{Html, Selector};
use sqlx::types::time::PrimitiveDateTime; use sqlx::types::time::PrimitiveDateTime;
use thiserror::Error; use thiserror::Error;
use tracing::{debug, error, info, warn};
use url::Url; use url::Url;
use crate::{ use crate::{

View File

@ -3,11 +3,10 @@ use std::collections::HashMap;
use cacher::FilesystemCacher; use cacher::FilesystemCacher;
use futures::{stream::FuturesUnordered, StreamExt}; use futures::{stream::FuturesUnordered, StreamExt};
use letterbox_shared::compute_color; use letterbox_shared::compute_color;
use log::{error, info};
use maplit::hashmap; use maplit::hashmap;
use scraper::Selector; use scraper::Selector;
use sqlx::postgres::PgPool; use sqlx::postgres::PgPool;
use tracing::instrument; use tracing::{error, info, instrument};
use url::Url; use url::Url;
use crate::{ use crate::{

View File

@ -5,11 +5,10 @@ use std::{
use letterbox_notmuch::Notmuch; use letterbox_notmuch::Notmuch;
use letterbox_shared::{compute_color, Rule}; use letterbox_shared::{compute_color, Rule};
use log::{error, info, warn};
use mailparse::{parse_content_type, parse_mail, MailHeader, MailHeaderMap, ParsedMail}; use mailparse::{parse_content_type, parse_mail, MailHeader, MailHeaderMap, ParsedMail};
use memmap::MmapOptions; use memmap::MmapOptions;
use sqlx::{types::Json, PgPool}; use sqlx::{types::Json, PgPool};
use tracing::{info_span, instrument}; use tracing::{error, info, info_span, instrument, warn};
use crate::{ use crate::{
compute_offset_limit, compute_offset_limit,