Use tracing for logging
This commit is contained in:
parent
f255af9f6a
commit
4d6d771ab4
36 changed files with 260 additions and 223 deletions
|
|
@ -281,7 +281,7 @@ mod imp {
|
|||
Some(&LpAspectRatio::default().to_variant()),
|
||||
);
|
||||
if let Err(err) = res {
|
||||
log::error!("Failed to call action edit-crop.aspect-ratio: {err}");
|
||||
tracing::error!("Failed to call action edit-crop.aspect-ratio: {err}");
|
||||
}
|
||||
|
||||
let (w, h) = self.image.image_size();
|
||||
|
|
@ -294,7 +294,7 @@ mod imp {
|
|||
.obj()
|
||||
.activate_action("edit-crop.orientation", Some(&orientation.to_variant()));
|
||||
if let Err(err) = res {
|
||||
log::error!("Failed to call action edit-crop.orientation: {err}");
|
||||
tracing::error!("Failed to call action edit-crop.orientation: {err}");
|
||||
}
|
||||
|
||||
self.obj().action_set_enabled("edit-crop.reset", false);
|
||||
|
|
|
|||
|
|
@ -846,7 +846,7 @@ mod imp {
|
|||
/// Set x coordinate of crop selection rectangle origin
|
||||
pub(super) fn set_crop_x(&self, x: f32) {
|
||||
if x < 0. {
|
||||
log::error!("Tried to set x coordinate to {x}");
|
||||
tracing::error!("Tried to set x coordinate to {x}");
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -864,7 +864,7 @@ mod imp {
|
|||
/// Set y coordinate of crop selection rectangle origin
|
||||
pub(super) fn set_crop_y(&self, y: f32) {
|
||||
if y < 0. {
|
||||
log::error!("Tried to set y coordinate to {y}");
|
||||
tracing::error!("Tried to set y coordinate to {y}");
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -911,7 +911,9 @@ mod imp {
|
|||
fn update_crop_area_image_coord(&self) {
|
||||
let crop_area_image_coord = self.crop_area_image_coord();
|
||||
if self.is_in_user_change() {
|
||||
log::trace!("Setting crop are in image coordinates to {crop_area_image_coord:?}");
|
||||
tracing::trace!(
|
||||
"Setting crop are in image coordinates to {crop_area_image_coord:?}"
|
||||
);
|
||||
self.crop_area_image_coord.replace(crop_area_image_coord);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue