Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Demote debug logs from info to trace #30

Merged
merged 1 commit into from
Sep 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/copy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ use std::{
thread,
};

use log::info;
use log::trace;
use wayland_client::{ConnectError, EventQueue, Main, Proxy};
use wayland_protocols::wlr::unstable::data_control::v1::client::{
zwlr_data_control_device_v1::ZwlrDataControlDeviceV1, zwlr_data_control_manager_v1::ZwlrDataControlManagerV1,
Expand Down Expand Up @@ -450,7 +450,7 @@ fn make_source(source: Source,
let temp_dir = tempfile::tempdir().map_err(SourceCreationError::TempDirCreate)?;
let mut temp_filename = temp_dir.into_path();
temp_filename.push("stdin");
info!("Temp filename: {}", temp_filename.to_string_lossy());
trace!("Temp filename: {}", temp_filename.to_string_lossy());
let mut temp_file = File::create(&temp_filename).map_err(SourceCreationError::TempFileCreate)?;

if let Source::Bytes(data) = source {
Expand All @@ -472,7 +472,7 @@ fn make_source(source: Source,
MimeType::Specific(mime_type) => mime_type,
};

info!("Base MIME type: {}", mime_type);
trace!("Base MIME type: {}", mime_type);

// Trim the trailing newline if needed.
if trim_newline && is_text(&mime_type) {
Expand Down
4 changes: 2 additions & 2 deletions wl-clipboard-rs-tools/src/bin/wl-paste.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use std::{

use anyhow::Context;
use libc::STDOUT_FILENO;
use log::info;
use log::trace;
use mime_guess::Mime;
use structopt::{clap::AppSettings, StructOpt};
use wl_clipboard_rs::{paste::*, utils::is_text};
Expand Down Expand Up @@ -103,7 +103,7 @@ fn main() -> Result<(), anyhow::Error> {
Some(ref mime_type) => MimeType::Specific(mime_type),
None => {
let inferred: Option<&str> = inferred.as_ref().map(Mime::as_ref);
info!("Inferred MIME type: {:?}", inferred);
trace!("Inferred MIME type: {:?}", inferred);
match inferred {
None | Some("application/octet-stream") => MimeType::Any,
// If the inferred MIME type is text, make sure we'll fall back to requesting
Expand Down