misc: Use tracing for logging
This commit is contained in:
parent
12842bbe7c
commit
97de17ce62
66 changed files with 74 additions and 69 deletions
2
Cargo.lock
generated
2
Cargo.lock
generated
|
@ -1359,7 +1359,6 @@ dependencies = [
|
|||
"indexmap 2.0.0",
|
||||
"libadwaita",
|
||||
"libshumate",
|
||||
"log",
|
||||
"matrix-sdk",
|
||||
"matrix-sdk-ui",
|
||||
"mime",
|
||||
|
@ -1380,6 +1379,7 @@ dependencies = [
|
|||
"strum",
|
||||
"thiserror",
|
||||
"tokio",
|
||||
"tracing",
|
||||
"tracing-subscriber",
|
||||
"url",
|
||||
]
|
||||
|
|
|
@ -42,7 +42,6 @@ html-escape = "0.2"
|
|||
html2pango = "0.5"
|
||||
image = "0.24"
|
||||
indexmap = "2"
|
||||
log = "0.4"
|
||||
mime = "0.3"
|
||||
mime_guess = "2"
|
||||
once_cell = "1"
|
||||
|
@ -63,6 +62,7 @@ serde_json = "1"
|
|||
strum = { version = "0.24", features = ["derive"] }
|
||||
thiserror = "1"
|
||||
tokio = { version = "1", features = ["rt", "rt-multi-thread", "sync"] }
|
||||
tracing = "0.1"
|
||||
tracing-subscriber = "0.3"
|
||||
url = "2"
|
||||
|
||||
|
|
|
@ -4,8 +4,8 @@ use gettextrs::gettext;
|
|||
use gio::{ApplicationFlags, Settings};
|
||||
use glib::{clone, WeakRef};
|
||||
use gtk::{gio, glib, prelude::*, subclass::prelude::*};
|
||||
use log::{debug, info};
|
||||
use ruma::{OwnedRoomId, RoomId};
|
||||
use tracing::{debug, info};
|
||||
|
||||
use crate::{config, Window};
|
||||
|
||||
|
|
|
@ -8,7 +8,6 @@ use gtk::{
|
|||
prelude::*,
|
||||
CompositeTemplate,
|
||||
};
|
||||
use log::error;
|
||||
use matrix_sdk::Error;
|
||||
use ruma::{
|
||||
api::client::{
|
||||
|
@ -18,6 +17,7 @@ use ruma::{
|
|||
assign,
|
||||
};
|
||||
use thiserror::Error;
|
||||
use tracing::error;
|
||||
|
||||
use crate::{prelude::*, session::model::Session, spawn, spawn_tokio};
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
use adw::subclass::prelude::*;
|
||||
use gtk::{gdk, glib, glib::clone, prelude::*, CompositeTemplate};
|
||||
use log::debug;
|
||||
use tracing::debug;
|
||||
|
||||
mod imp {
|
||||
use std::cell::RefCell;
|
||||
|
|
|
@ -8,7 +8,7 @@ use gtk::{
|
|||
prelude::*,
|
||||
CompositeTemplate,
|
||||
};
|
||||
use log::{debug, error};
|
||||
use tracing::{debug, error};
|
||||
|
||||
use super::{ActionButton, ActionState, ImagePaintable};
|
||||
use crate::{
|
||||
|
|
|
@ -9,7 +9,7 @@ use image::{
|
|||
flat::SampleLayout,
|
||||
AnimationDecoder, DynamicImage, ImageFormat,
|
||||
};
|
||||
use log::error;
|
||||
use tracing::error;
|
||||
|
||||
/// A single frame of an animation.
|
||||
pub struct Frame {
|
||||
|
|
|
@ -2,7 +2,7 @@ use adw::{prelude::*, subclass::prelude::*};
|
|||
use geo_uri::GeoUri;
|
||||
use gettextrs::gettext;
|
||||
use gtk::{gdk, gio, glib, glib::clone, CompositeTemplate};
|
||||
use log::warn;
|
||||
use tracing::warn;
|
||||
|
||||
use super::{AudioPlayer, ImagePaintable, LocationViewer, Spinner};
|
||||
use crate::spawn;
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
use adw::{prelude::*, subclass::prelude::*};
|
||||
use gtk::{gdk, glib, graphene};
|
||||
use tracing::warn;
|
||||
|
||||
const ANIMATION_DURATION: u32 = 250;
|
||||
|
||||
|
@ -115,7 +116,7 @@ mod imp {
|
|||
.upgrade()
|
||||
.and_then(|s| s.compute_bounds(&*obj))
|
||||
.unwrap_or_else(|| {
|
||||
log::warn!(
|
||||
warn!(
|
||||
"The source widget bounds could not be calculated, using default bounds as fallback"
|
||||
);
|
||||
graphene::Rect::new(0.0, 0.0, 100.0, 100.0)
|
||||
|
@ -159,7 +160,7 @@ mod imp {
|
|||
);
|
||||
}
|
||||
} else {
|
||||
log::warn!("The source widget texture is None, using child snapshot as fallback");
|
||||
warn!("The source widget texture is None, using child snapshot as fallback");
|
||||
obj.snapshot_child(&child, snapshot);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@ use adw::subclass::prelude::*;
|
|||
use gst::ClockTime;
|
||||
use gst_play::{Play as GstPlay, PlayMessage};
|
||||
use gtk::{gio, glib, glib::clone, prelude::*, CompositeTemplate};
|
||||
use log::{error, warn};
|
||||
use tracing::{error, warn};
|
||||
|
||||
use super::VideoPlayerRenderer;
|
||||
|
||||
|
|
|
@ -25,6 +25,7 @@ use gtk::{
|
|||
subclass::prelude::*,
|
||||
};
|
||||
use matrix_sdk::encryption::verification::QrVerificationData;
|
||||
use tracing::error;
|
||||
|
||||
use crate::contrib::qr_code_scanner::{qr_code_detector::QrCodeDetector, QrVerificationDataBoxed};
|
||||
|
||||
|
@ -192,7 +193,7 @@ impl CameraPaintable {
|
|||
bus.add_watch_local(
|
||||
clone!(@weak self as paintable => @default-return glib::Continue(false), move |_, msg| {
|
||||
if let gst::MessageView::Error(err) = msg.view() {
|
||||
log::error!(
|
||||
error!(
|
||||
"Error from {:?}: {} ({:?})",
|
||||
err.src().map(|s| s.path_string()),
|
||||
err.error(),
|
||||
|
|
|
@ -3,9 +3,9 @@ use std::convert::AsRef;
|
|||
use glib::Sender;
|
||||
use gst_video::{video_frame::VideoFrameRef, VideoInfo};
|
||||
use image::{GenericImage, GenericImageView, Luma};
|
||||
use log::debug;
|
||||
use matrix_sdk::encryption::verification::{DecodingError, QrVerificationData};
|
||||
use thiserror::Error;
|
||||
use tracing::debug;
|
||||
|
||||
use super::*;
|
||||
use crate::contrib::qr_code_scanner::camera_paintable::Action;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
use adw::subclass::prelude::BinImpl;
|
||||
use gettextrs::gettext;
|
||||
use gtk::{self, glib, glib::clone, prelude::*, subclass::prelude::*, CompositeTemplate};
|
||||
use log::error;
|
||||
use tracing::error;
|
||||
|
||||
use crate::{spawn, toast, Window};
|
||||
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
use adw::{prelude::*, subclass::prelude::BinImpl};
|
||||
use gettextrs::gettext;
|
||||
use gtk::{self, glib, glib::clone, subclass::prelude::*, CompositeTemplate};
|
||||
use log::warn;
|
||||
use matrix_sdk::{
|
||||
config::RequestConfig, sanitize_server_name, Client, ClientBuildError, ClientBuilder,
|
||||
};
|
||||
use ruma::{api::client::discovery::get_supported_versions, OwnedServerName};
|
||||
use tracing::warn;
|
||||
use url::{ParseError, Url};
|
||||
|
||||
use super::Login;
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
use adw::{prelude::*, subclass::prelude::BinImpl};
|
||||
use gettextrs::gettext;
|
||||
use gtk::{self, glib, glib::clone, subclass::prelude::*, CompositeTemplate};
|
||||
use log::warn;
|
||||
use ruma::api::client::session::get_login_types::v3::LoginType;
|
||||
use tracing::warn;
|
||||
|
||||
use super::{idp_button::IdpButton, Login};
|
||||
use crate::{
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
use adw::{prelude::*, subclass::prelude::BinImpl};
|
||||
use gettextrs::gettext;
|
||||
use gtk::{self, gio, glib, glib::clone, subclass::prelude::*, CompositeTemplate};
|
||||
use log::{error, warn};
|
||||
use matrix_sdk::Client;
|
||||
use ruma::{
|
||||
api::client::session::{get_login_types::v3::LoginType, login},
|
||||
OwnedServerName,
|
||||
};
|
||||
use strum::{AsRefStr, EnumString};
|
||||
use tracing::{error, warn};
|
||||
use url::Url;
|
||||
|
||||
mod advanced_dialog;
|
||||
|
|
|
@ -2,7 +2,6 @@ use std::{collections::HashMap, ffi::OsStr, fmt, fs, path::PathBuf, string::From
|
|||
|
||||
use gettextrs::gettext;
|
||||
use gtk::glib;
|
||||
use log::{debug, error, warn};
|
||||
use matrix_sdk::{
|
||||
matrix_auth::{Session as MatrixSession, SessionTokens},
|
||||
SessionMeta,
|
||||
|
@ -14,6 +13,7 @@ use ruma::{DeviceId, OwnedDeviceId, OwnedUserId, UserId};
|
|||
use serde::{Deserialize, Serialize};
|
||||
use serde_json::error::Error as JsonError;
|
||||
use thiserror::Error;
|
||||
use tracing::{debug, error, warn};
|
||||
use url::Url;
|
||||
|
||||
use crate::{gettext_f, prelude::*, spawn_tokio, utils::matrix, APP_ID, PROFILE};
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
use gtk::{gdk, glib, prelude::*, subclass::prelude::*};
|
||||
use tracing::warn;
|
||||
|
||||
use super::AvatarImage;
|
||||
use crate::{
|
||||
|
@ -124,7 +125,7 @@ impl AvatarData {
|
|||
match icon {
|
||||
Ok(icon) => Some(icon),
|
||||
Err(error) => {
|
||||
log::warn!("Failed to generate icon for notification: {error}");
|
||||
warn!("Failed to generate icon for notification: {error}");
|
||||
None
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
use gtk::{gdk, glib, glib::clone, prelude::*, subclass::prelude::*};
|
||||
use log::error;
|
||||
use matrix_sdk::{
|
||||
media::{MediaFormat, MediaRequest, MediaThumbnailSize},
|
||||
ruma::{
|
||||
|
@ -7,6 +6,7 @@ use matrix_sdk::{
|
|||
OwnedMxcUri,
|
||||
},
|
||||
};
|
||||
use tracing::error;
|
||||
|
||||
use crate::{components::ImagePaintable, session::model::Session, spawn, spawn_tokio};
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
use gtk::{gio, glib, prelude::*, subclass::prelude::*};
|
||||
use log::{debug, warn};
|
||||
use ruma::{
|
||||
api::client::push::get_notifications::v3::Notification, EventId, OwnedEventId, OwnedRoomId,
|
||||
RoomId,
|
||||
};
|
||||
use tracing::{debug, warn};
|
||||
|
||||
use super::{Room, Session};
|
||||
use crate::{
|
||||
|
|
|
@ -10,6 +10,7 @@ use matrix_sdk::{
|
|||
OwnedMxcUri, UserId,
|
||||
},
|
||||
};
|
||||
use tracing::error;
|
||||
|
||||
use super::{
|
||||
power_levels::{PowerLevel, POWER_LEVEL_MAX, POWER_LEVEL_MIN},
|
||||
|
@ -205,7 +206,7 @@ impl Member {
|
|||
/// Update the user based on the room member.
|
||||
pub fn update_from_room_member(&self, member: &RoomMember) {
|
||||
if member.user_id() != &*self.user_id() {
|
||||
log::error!("Tried Member update from RoomMember with wrong user ID.");
|
||||
error!("Tried Member update from RoomMember with wrong user ID.");
|
||||
return;
|
||||
};
|
||||
|
||||
|
@ -220,7 +221,7 @@ impl Member {
|
|||
/// Update the user based on the room member state event
|
||||
pub fn update_from_member_event(&self, event: &impl MemberEvent) {
|
||||
if event.state_key() != &*self.user_id() {
|
||||
log::error!("Tried Member update from MemberEvent with wrong user ID.");
|
||||
error!("Tried Member update from MemberEvent with wrong user ID.");
|
||||
return;
|
||||
};
|
||||
|
||||
|
|
|
@ -12,7 +12,6 @@ use std::{cell::RefCell, io::Cursor};
|
|||
|
||||
use gettextrs::gettext;
|
||||
use gtk::{glib, glib::clone, prelude::*, subclass::prelude::*};
|
||||
use log::{debug, error, warn};
|
||||
use matrix_sdk::{
|
||||
attachment::{generate_image_thumbnail, AttachmentConfig, AttachmentInfo, Thumbnail},
|
||||
deserialized_responses::{MemberEvent, SyncOrStrippedState, SyncTimelineEvent},
|
||||
|
@ -33,6 +32,7 @@ use ruma::{
|
|||
},
|
||||
OwnedEventId, OwnedRoomId, OwnedUserId, RoomId,
|
||||
};
|
||||
use tracing::{debug, error, warn};
|
||||
|
||||
pub use self::{
|
||||
event::*,
|
||||
|
|
|
@ -6,7 +6,6 @@ use std::{collections::HashMap, sync::Arc};
|
|||
use eyeball_im::VectorDiff;
|
||||
use futures_util::StreamExt;
|
||||
use gtk::{gio, glib, glib::clone, prelude::*, subclass::prelude::*};
|
||||
use log::{error, warn};
|
||||
use matrix_sdk::Error as MatrixError;
|
||||
use matrix_sdk_ui::timeline::{
|
||||
BackPaginationStatus, PaginationOptions, RoomExt, Timeline as SdkTimeline,
|
||||
|
@ -19,6 +18,7 @@ use ruma::{
|
|||
},
|
||||
OwnedEventId,
|
||||
};
|
||||
use tracing::{error, warn};
|
||||
|
||||
pub use self::{
|
||||
timeline_item::{TimelineItem, TimelineItemExt, TimelineItemImpl},
|
||||
|
|
|
@ -5,11 +5,11 @@ use std::{
|
|||
|
||||
use gtk::{gio, glib, glib::clone, prelude::*, subclass::prelude::*};
|
||||
use indexmap::map::IndexMap;
|
||||
use log::error;
|
||||
use matrix_sdk::{
|
||||
ruma::{OwnedRoomId, OwnedRoomOrAliasId, OwnedServerName, RoomAliasId, RoomId, RoomOrAliasId},
|
||||
sync::Rooms as ResponseRooms,
|
||||
};
|
||||
use tracing::error;
|
||||
|
||||
use crate::{
|
||||
gettext_f,
|
||||
|
|
|
@ -7,7 +7,6 @@ use gtk::{
|
|||
self, gio, glib,
|
||||
glib::{clone, signal::SignalHandlerId},
|
||||
};
|
||||
use log::{debug, error};
|
||||
use matrix_sdk::{
|
||||
config::SyncSettings, matrix_auth::Session as MatrixSession, room::Room as MatrixRoom,
|
||||
sync::SyncResponse, Client,
|
||||
|
@ -25,6 +24,7 @@ use ruma::{
|
|||
},
|
||||
};
|
||||
use tokio::task::JoinHandle;
|
||||
use tracing::{debug, error};
|
||||
use url::Url;
|
||||
|
||||
use super::{
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
use gtk::{glib, prelude::*, subclass::prelude::*};
|
||||
use indexmap::IndexMap;
|
||||
use log::error;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use tracing::error;
|
||||
|
||||
use crate::Application;
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
use gtk::{glib, glib::clone, prelude::*, subclass::prelude::*};
|
||||
use log::error;
|
||||
use matrix_sdk::{
|
||||
encryption::identities::UserIdentity,
|
||||
ruma::{OwnedMxcUri, OwnedUserId, UserId},
|
||||
};
|
||||
use tracing::error;
|
||||
|
||||
use crate::{
|
||||
components::Pill,
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
use std::time::Duration;
|
||||
|
||||
use gtk::{glib, glib::clone, prelude::*, subclass::prelude::*};
|
||||
use log::{debug, error, warn};
|
||||
use matrix_sdk::{
|
||||
encryption::{
|
||||
identities::RequestVerificationError,
|
||||
|
@ -16,6 +15,7 @@ use matrix_sdk::{
|
|||
use qrcode::QrCode;
|
||||
use ruma::events::key::verification::{REQUEST_RECEIVED_TIMEOUT, REQUEST_TIMESTAMP_TIMEOUT};
|
||||
use tokio::sync::mpsc;
|
||||
use tracing::{debug, error, warn};
|
||||
|
||||
use crate::{
|
||||
contrib::Camera,
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
use gtk::{gio, glib, glib::clone, prelude::*, subclass::prelude::*};
|
||||
use log::{debug, warn};
|
||||
use matrix_sdk::ruma::{
|
||||
events::{
|
||||
room::message::MessageType, AnySyncMessageLikeEvent, AnySyncTimelineEvent,
|
||||
|
@ -9,6 +8,7 @@ use matrix_sdk::ruma::{
|
|||
MilliSecondsSinceUnixEpoch, OwnedUserId, UserId,
|
||||
};
|
||||
use ruma::events::key::verification::REQUEST_TIMESTAMP_TIMEOUT;
|
||||
use tracing::{debug, warn};
|
||||
|
||||
use crate::{
|
||||
prelude::*,
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
use gettextrs::gettext;
|
||||
use gtk::{gio, glib, glib::clone, prelude::*, subclass::prelude::*};
|
||||
use log::error;
|
||||
use matrix_sdk::{
|
||||
encryption::identities::UserDevices as CryptoDevices,
|
||||
ruma::api::client::device::Device as MatrixDevice, Error,
|
||||
};
|
||||
use tracing::error;
|
||||
|
||||
use super::{Device, DeviceItem};
|
||||
use crate::{session::model::Session, spawn, spawn_tokio};
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
use adw::{self, prelude::*};
|
||||
use gettextrs::gettext;
|
||||
use gtk::{glib, glib::clone, subclass::prelude::*, CompositeTemplate};
|
||||
use log::error;
|
||||
use tracing::error;
|
||||
|
||||
use super::Device;
|
||||
use crate::{
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
use adw::{prelude::*, subclass::prelude::*};
|
||||
use gettextrs::gettext;
|
||||
use gtk::{glib, glib::clone, CompositeTemplate};
|
||||
use log::{error, warn};
|
||||
use matrix_sdk::event_handler::EventHandlerDropGuard;
|
||||
use ruma::{
|
||||
api::client::push::{set_pushrule_enabled, RuleKind, RuleScope},
|
||||
events::push_rules::{PushRulesEvent, PushRulesEventContent},
|
||||
push::{PredefinedOverrideRuleId, Ruleset},
|
||||
};
|
||||
use tracing::{error, warn};
|
||||
|
||||
use crate::{prelude::*, session::model::Session, spawn, spawn_tokio, toast};
|
||||
|
||||
|
|
|
@ -5,8 +5,8 @@ use gtk::{
|
|||
glib::{self, clone},
|
||||
CompositeTemplate,
|
||||
};
|
||||
use log::{debug, error};
|
||||
use matrix_sdk::encryption::{KeyExportError, RoomKeyImportError};
|
||||
use tracing::{debug, error};
|
||||
|
||||
use crate::{
|
||||
components::SpinnerButton, ngettext_f, session::model::Session, spawn, spawn_tokio, toast,
|
||||
|
|
|
@ -4,11 +4,11 @@ use gtk::{
|
|||
glib::{self, clone},
|
||||
CompositeTemplate,
|
||||
};
|
||||
use log::error;
|
||||
use matrix_sdk::ruma::{
|
||||
api::client::{account::change_password, error::ErrorKind},
|
||||
assign,
|
||||
};
|
||||
use tracing::error;
|
||||
|
||||
use crate::{
|
||||
components::{AuthDialog, AuthError, SpinnerButton},
|
||||
|
|
|
@ -4,8 +4,8 @@ use gtk::{
|
|||
glib::{self, clone},
|
||||
CompositeTemplate,
|
||||
};
|
||||
use log::error;
|
||||
use matrix_sdk::ruma::{api::client::account::deactivate, assign};
|
||||
use tracing::error;
|
||||
|
||||
use crate::{
|
||||
components::{AuthDialog, SpinnerButton},
|
||||
|
|
|
@ -5,8 +5,8 @@ use gtk::{
|
|||
glib::{self, clone},
|
||||
CompositeTemplate,
|
||||
};
|
||||
use log::error;
|
||||
use matrix_sdk::ruma::{api::client::discovery::get_capabilities, OwnedMxcUri};
|
||||
use tracing::error;
|
||||
|
||||
mod change_password_subpage;
|
||||
mod deactivate_account_subpage;
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
use gtk::{gio, glib, glib::clone, prelude::*, subclass::prelude::*};
|
||||
use log::error;
|
||||
use matrix_sdk::ruma::{
|
||||
api::client::directory::get_public_rooms_filtered::v3::{
|
||||
Request as PublicRoomsRequest, Response as PublicRoomsResponse,
|
||||
|
@ -9,6 +8,7 @@ use matrix_sdk::ruma::{
|
|||
uint, ServerName,
|
||||
};
|
||||
use ruma::directory::RoomTypeFilter;
|
||||
use tracing::error;
|
||||
|
||||
use super::{PublicRoom, Server};
|
||||
use crate::{session::model::Session, spawn, spawn_tokio};
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
use gtk::{gio, glib, glib::clone, prelude::*, subclass::prelude::*};
|
||||
use log::error;
|
||||
use ruma::api::client::thirdparty::get_protocols;
|
||||
use tracing::error;
|
||||
|
||||
use super::Server;
|
||||
use crate::{prelude::*, session::model::Session, spawn, spawn_tokio};
|
||||
|
|
|
@ -7,7 +7,6 @@ use gtk::{
|
|||
glib::{self, clone},
|
||||
CompositeTemplate,
|
||||
};
|
||||
use log::error;
|
||||
use matrix_sdk::RoomState;
|
||||
use ruma::{
|
||||
assign,
|
||||
|
@ -17,6 +16,7 @@ use ruma::{
|
|||
},
|
||||
OwnedMxcUri,
|
||||
};
|
||||
use tracing::error;
|
||||
|
||||
use crate::{
|
||||
components::{CustomEntry, EditableAvatar, SpinnerButton},
|
||||
|
|
|
@ -2,11 +2,11 @@ use adw::{prelude::*, subclass::prelude::*};
|
|||
use gettextrs::gettext;
|
||||
use glib::clone;
|
||||
use gtk::{gio, glib, CompositeTemplate};
|
||||
use log::warn;
|
||||
use matrix_sdk::ruma::events::{
|
||||
room::message::{AudioMessageEventContent, MessageType},
|
||||
AnyMessageLikeEventContent,
|
||||
};
|
||||
use tracing::warn;
|
||||
|
||||
use super::HistoryViewerEvent;
|
||||
use crate::{session::model::Session, spawn, spawn_tokio};
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
use adw::{prelude::*, subclass::prelude::*};
|
||||
use gettextrs::gettext;
|
||||
use gtk::{gio, glib, CompositeTemplate};
|
||||
use log::error;
|
||||
use matrix_sdk::ruma::events::{room::message::MessageType, AnyMessageLikeEventContent};
|
||||
use tracing::error;
|
||||
|
||||
use super::HistoryViewerEvent;
|
||||
use crate::{prelude::*, toast};
|
||||
|
@ -135,7 +135,7 @@ impl FileRow {
|
|||
if let Err(e) =
|
||||
gio::AppInfo::launch_default_for_uri(&file.uri(), gio::AppLaunchContext::NONE)
|
||||
{
|
||||
log::error!("Error: {e}");
|
||||
error!("Error: {e}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
use adw::{prelude::*, subclass::prelude::*};
|
||||
use gtk::{glib, glib::clone, CompositeTemplate};
|
||||
use log::error;
|
||||
use ruma::events::AnyMessageLikeEventContent;
|
||||
use tracing::error;
|
||||
|
||||
use super::{MediaItem, Timeline, TimelineFilter};
|
||||
use crate::{
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
use gtk::{gdk, glib, glib::clone, prelude::*, subclass::prelude::*, CompositeTemplate};
|
||||
use log::warn;
|
||||
use matrix_sdk::{
|
||||
media::{MediaEventContent, MediaThumbnailSize},
|
||||
ruma::{
|
||||
|
@ -11,6 +10,7 @@ use matrix_sdk::{
|
|||
uint,
|
||||
},
|
||||
};
|
||||
use tracing::warn;
|
||||
|
||||
use super::{HistoryViewerEvent, MediaHistoryViewer};
|
||||
use crate::{session::model::Session, spawn, spawn_tokio};
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
use gtk::{gio, glib, prelude::*, subclass::prelude::*};
|
||||
use log::error;
|
||||
use matrix_sdk::{
|
||||
room::MessagesOptions,
|
||||
ruma::{
|
||||
|
@ -9,6 +8,7 @@ use matrix_sdk::{
|
|||
uint,
|
||||
},
|
||||
};
|
||||
use tracing::error;
|
||||
|
||||
use super::HistoryViewerEvent;
|
||||
use crate::{
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
use gettextrs::gettext;
|
||||
use gtk::{gio, glib, glib::clone, prelude::*, subclass::prelude::*};
|
||||
use log::error;
|
||||
use matrix_sdk::{
|
||||
ruma::{
|
||||
api::client::{profile::get_profile, user_directory::search_users},
|
||||
|
@ -8,6 +7,7 @@ use matrix_sdk::{
|
|||
},
|
||||
HttpError,
|
||||
};
|
||||
use tracing::error;
|
||||
|
||||
use super::Invitee;
|
||||
use crate::{
|
||||
|
|
|
@ -8,7 +8,7 @@ use gtk::{
|
|||
glib::{self, clone, closure},
|
||||
CompositeTemplate,
|
||||
};
|
||||
use log::warn;
|
||||
use tracing::warn;
|
||||
|
||||
mod member_menu;
|
||||
mod members_list_view;
|
||||
|
|
|
@ -8,7 +8,7 @@ use std::convert::From;
|
|||
use adw::{prelude::*, subclass::prelude::*};
|
||||
use gettextrs::gettext;
|
||||
use gtk::{glib, CompositeTemplate};
|
||||
use log::warn;
|
||||
use tracing::warn;
|
||||
|
||||
pub use self::{
|
||||
general_page::GeneralPage,
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
use gettextrs::gettext;
|
||||
use gtk::{gdk, gio, glib, glib::clone, prelude::*};
|
||||
use log::error;
|
||||
use matrix_sdk_ui::timeline::TimelineItemContent;
|
||||
use once_cell::sync::Lazy;
|
||||
use ruma::events::room::{message::MessageType, power_levels::PowerLevelAction};
|
||||
use tracing::error;
|
||||
|
||||
use crate::{
|
||||
prelude::*,
|
||||
|
|
|
@ -5,8 +5,8 @@ use gtk::{
|
|||
glib::{self, clone},
|
||||
CompositeTemplate,
|
||||
};
|
||||
use log::warn;
|
||||
use matrix_sdk::ruma::events::room::message::AudioMessageEventContent;
|
||||
use tracing::warn;
|
||||
|
||||
use super::{media::MediaState, ContentFormat};
|
||||
use crate::{
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
use adw::{prelude::*, subclass::prelude::*};
|
||||
use gettextrs::gettext;
|
||||
use gtk::{gdk, glib, glib::clone};
|
||||
use log::{error, warn};
|
||||
use matrix_sdk_ui::timeline::{TimelineDetails, TimelineItemContent};
|
||||
use ruma::events::room::message::MessageType;
|
||||
use tracing::{error, warn};
|
||||
|
||||
use super::{
|
||||
audio::MessageAudio, file::MessageFile, location::MessageLocation, media::MessageMedia,
|
||||
|
|
|
@ -2,7 +2,7 @@ use adw::{prelude::*, subclass::prelude::*};
|
|||
use geo_uri::GeoUri;
|
||||
use gettextrs::gettext;
|
||||
use gtk::{glib, CompositeTemplate};
|
||||
use log::warn;
|
||||
use tracing::warn;
|
||||
|
||||
use super::ContentFormat;
|
||||
use crate::components::LocationViewer;
|
||||
|
|
|
@ -5,7 +5,6 @@ use gtk::{
|
|||
glib::{self, clone},
|
||||
CompositeTemplate,
|
||||
};
|
||||
use log::warn;
|
||||
use matrix_sdk::{
|
||||
media::{MediaEventContent, MediaThumbnailSize},
|
||||
ruma::{
|
||||
|
@ -16,6 +15,7 @@ use matrix_sdk::{
|
|||
},
|
||||
},
|
||||
};
|
||||
use tracing::warn;
|
||||
|
||||
use super::ContentFormat;
|
||||
use crate::{
|
||||
|
|
|
@ -25,7 +25,6 @@ use gtk::{
|
|||
prelude::*,
|
||||
CompositeTemplate,
|
||||
};
|
||||
use log::{debug, error, warn};
|
||||
use matrix_sdk::{
|
||||
attachment::{AttachmentInfo, BaseFileInfo, BaseImageInfo},
|
||||
ruma::{
|
||||
|
@ -49,6 +48,7 @@ use ruma::{
|
|||
OwnedEventId,
|
||||
};
|
||||
use sourceview::prelude::*;
|
||||
use tracing::{debug, error, warn};
|
||||
|
||||
use self::{
|
||||
attachment_dialog::AttachmentDialog,
|
||||
|
|
|
@ -4,7 +4,6 @@ mod tombstone;
|
|||
use adw::{prelude::*, subclass::prelude::*};
|
||||
use gettextrs::gettext;
|
||||
use gtk::{glib, CompositeTemplate};
|
||||
use log::warn;
|
||||
use matrix_sdk_ui::timeline::{
|
||||
AnyOtherFullStateEventContent, MemberProfileChange, MembershipChange, OtherState,
|
||||
RoomMembershipChange, TimelineItemContent,
|
||||
|
@ -13,6 +12,7 @@ use ruma::{
|
|||
events::{room::member::MembershipState, FullStateEventContent},
|
||||
UserId,
|
||||
};
|
||||
use tracing::warn;
|
||||
|
||||
use self::{creation::StateCreation, tombstone::StateTombstone};
|
||||
use super::ReadReceiptsList;
|
||||
|
|
|
@ -3,9 +3,9 @@ use std::collections::HashMap;
|
|||
use adw::subclass::prelude::*;
|
||||
use gettextrs::gettext;
|
||||
use gtk::{gio, glib, glib::clone, prelude::*, CompositeTemplate};
|
||||
use log::{error, warn};
|
||||
use matrix_sdk::encryption::verification::QrVerificationData;
|
||||
use ruma::events::key::verification::cancel::CancelCode;
|
||||
use tracing::{error, warn};
|
||||
|
||||
use super::Emoji;
|
||||
use crate::{
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
use adw::subclass::prelude::*;
|
||||
use gettextrs::gettext;
|
||||
use gtk::{glib, glib::clone, prelude::*, CompositeTemplate};
|
||||
use log::{debug, error};
|
||||
use tracing::{debug, error};
|
||||
|
||||
use super::IdentityVerificationWidget;
|
||||
use crate::{
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
use gtk::{glib, prelude::*, subclass::prelude::*};
|
||||
use log::{debug, error};
|
||||
use matrix_sdk::ruma::{
|
||||
api::client::room::create_room,
|
||||
assign,
|
||||
events::{room::encryption::RoomEncryptionEventContent, InitialStateEvent},
|
||||
MxcUri, UserId,
|
||||
};
|
||||
use tracing::{debug, error};
|
||||
|
||||
use crate::{
|
||||
prelude::*,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
use gtk::{gio, glib, glib::clone, prelude::*, subclass::prelude::*};
|
||||
use log::{debug, error};
|
||||
use matrix_sdk::ruma::{api::client::user_directory::search_users, OwnedUserId, UserId};
|
||||
use tracing::{debug, error};
|
||||
|
||||
use super::DmUser;
|
||||
use crate::{
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
use adw::{prelude::*, subclass::prelude::*};
|
||||
use gettextrs::gettext;
|
||||
use gtk::{gdk, gio, glib, glib::clone, graphene, CompositeTemplate};
|
||||
use log::{error, warn};
|
||||
use matrix_sdk::ruma::events::room::message::MessageType;
|
||||
use ruma::OwnedEventId;
|
||||
use tracing::{error, warn};
|
||||
|
||||
use crate::{
|
||||
components::{ContentType, ImagePaintable, MediaContentViewer, ScaleRevealer},
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
use adw::{prelude::*, subclass::prelude::*};
|
||||
use gettextrs::gettext;
|
||||
use gtk::{gdk, glib, glib::clone, CompositeTemplate};
|
||||
use log::error;
|
||||
use matrix_sdk::{
|
||||
ruma::{
|
||||
api::client::{
|
||||
|
@ -13,6 +12,7 @@ use matrix_sdk::{
|
|||
Error,
|
||||
};
|
||||
use ruma::events::{room::encryption::RoomEncryptionEventContent, InitialStateEvent};
|
||||
use tracing::error;
|
||||
|
||||
use crate::{
|
||||
components::SpinnerButton, prelude::*, session::model::Session, spawn, spawn_tokio, Window,
|
||||
|
|
|
@ -4,8 +4,8 @@ use gtk::{
|
|||
glib::{clone, signal::SignalHandlerId},
|
||||
CompositeTemplate,
|
||||
};
|
||||
use log::{error, warn};
|
||||
use ruma::RoomId;
|
||||
use tracing::{error, warn};
|
||||
|
||||
use super::{Content, CreateDmDialog, JoinRoomDialog, MediaViewer, RoomCreation, Sidebar};
|
||||
use crate::{
|
||||
|
|
|
@ -6,7 +6,7 @@ mod verification_row;
|
|||
|
||||
use adw::{prelude::*, subclass::prelude::*};
|
||||
use gtk::{gio, glib, glib::clone, CompositeTemplate};
|
||||
use log::error;
|
||||
use tracing::error;
|
||||
|
||||
use self::{
|
||||
category_row::CategoryRow, entry_row::EntryRow, room_row::RoomRow, row::Row,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
use gtk::{gio, glib, glib::clone, prelude::*, subclass::prelude::*};
|
||||
use log::error;
|
||||
use tracing::error;
|
||||
|
||||
use crate::utils::BoundObject;
|
||||
|
||||
|
|
|
@ -4,9 +4,9 @@ use std::{cell::Cell, str::FromStr, sync::Mutex};
|
|||
|
||||
use gettextrs::gettext;
|
||||
use gtk::{gio, glib, prelude::*};
|
||||
use log::{debug, error};
|
||||
use matrix_sdk::attachment::{BaseAudioInfo, BaseImageInfo, BaseVideoInfo};
|
||||
use mime::Mime;
|
||||
use tracing::{debug, error};
|
||||
|
||||
use crate::toast;
|
||||
|
||||
|
|
|
@ -24,6 +24,7 @@ use gtk::{
|
|||
use matrix_sdk::ruma::UInt;
|
||||
use once_cell::sync::{Lazy, OnceCell};
|
||||
use regex::Regex;
|
||||
use tracing::error;
|
||||
|
||||
pub use self::expression_list_model::ExpressionListModel;
|
||||
use crate::RUNTIME;
|
||||
|
@ -117,7 +118,7 @@ pub async fn check_if_reachable(hostname: &impl AsRef<str>) -> bool {
|
|||
match monitor.can_reach_future(&address).await {
|
||||
Ok(()) => true,
|
||||
Err(error) => {
|
||||
log::error!("Homeserver {} isn't reachable: {error}", hostname.as_ref());
|
||||
error!("Homeserver {} isn't reachable: {error}", hostname.as_ref());
|
||||
false
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,8 +4,8 @@ use adw::subclass::prelude::AdwApplicationWindowImpl;
|
|||
use gettextrs::gettext;
|
||||
use glib::signal::Inhibit;
|
||||
use gtk::{self, gdk, gio, glib, glib::clone, prelude::*, subclass::prelude::*, CompositeTemplate};
|
||||
use log::{error, info, warn};
|
||||
use ruma::RoomId;
|
||||
use tracing::{error, info, warn};
|
||||
|
||||
use crate::{
|
||||
account_switcher::AccountSwitcher,
|
||||
|
|
Loading…
Reference in a new issue