mirror of
https://github.com/martinvonz/jj.git
synced 2025-01-20 03:20:08 +00:00
tracing: bump a few trace events from DEBUG to INFO
Now that we don't print INFO-level events by default, we can start using that level.
This commit is contained in:
parent
9a942b98f8
commit
9c91f8190d
5 changed files with 12 additions and 12 deletions
|
@ -633,14 +633,14 @@ impl<'a> RemoteCallbacks<'a> {
|
|||
let credential_helper = git_config
|
||||
.and_then(|conf| git2::Cred::credential_helper(&conf, url, username_from_url));
|
||||
if let Ok(creds) = credential_helper {
|
||||
tracing::debug!("using credential_helper");
|
||||
tracing::info!("using credential_helper");
|
||||
return Ok(creds);
|
||||
} else if let Some(username) = username_from_url {
|
||||
if allowed_types.contains(git2::CredentialType::SSH_KEY) {
|
||||
if std::env::var("SSH_AUTH_SOCK").is_ok()
|
||||
|| std::env::var("SSH_AGENT_PID").is_ok()
|
||||
{
|
||||
tracing::debug!(username, "using ssh_key_from_agent");
|
||||
tracing::info!(username, "using ssh_key_from_agent");
|
||||
return git2::Cred::ssh_key_from_agent(username).map_err(|err| {
|
||||
tracing::error!(err = %err);
|
||||
err
|
||||
|
@ -648,7 +648,7 @@ impl<'a> RemoteCallbacks<'a> {
|
|||
}
|
||||
if let Some(ref mut cb) = self.get_ssh_key {
|
||||
if let Some(path) = cb(username) {
|
||||
tracing::debug!(username, path = ?path, "using ssh_key");
|
||||
tracing::info!(username, path = ?path, "using ssh_key");
|
||||
return git2::Cred::ssh_key(username, None, &path, None).map_err(
|
||||
|err| {
|
||||
tracing::error!(err = %err);
|
||||
|
@ -661,7 +661,7 @@ impl<'a> RemoteCallbacks<'a> {
|
|||
if allowed_types.contains(git2::CredentialType::USER_PASS_PLAINTEXT) {
|
||||
if let Some(ref mut cb) = self.get_password {
|
||||
if let Some(pw) = cb(url, username) {
|
||||
tracing::debug!(
|
||||
tracing::info!(
|
||||
username,
|
||||
"using userpass_plaintext with username from url"
|
||||
);
|
||||
|
@ -675,7 +675,7 @@ impl<'a> RemoteCallbacks<'a> {
|
|||
} else if allowed_types.contains(git2::CredentialType::USER_PASS_PLAINTEXT) {
|
||||
if let Some(ref mut cb) = self.get_username_password {
|
||||
if let Some((username, pw)) = cb(url) {
|
||||
tracing::debug!(username, "using userpass_plaintext");
|
||||
tracing::info!(username, "using userpass_plaintext");
|
||||
return git2::Cred::userpass_plaintext(&username, &pw).map_err(|err| {
|
||||
tracing::error!(err = %err);
|
||||
err
|
||||
|
@ -683,7 +683,7 @@ impl<'a> RemoteCallbacks<'a> {
|
|||
}
|
||||
}
|
||||
}
|
||||
tracing::debug!("using default");
|
||||
tracing::info!("using default");
|
||||
git2::Cred::default()
|
||||
});
|
||||
callbacks
|
||||
|
|
|
@ -347,7 +347,7 @@ impl TracingSubscription {
|
|||
.map_err(|err| {
|
||||
CommandError::InternalError(format!("failed to enable verbose logging: {err:?}"))
|
||||
})?;
|
||||
tracing::debug!("verbose logging enabled");
|
||||
tracing::info!("verbose logging enabled");
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
|
|
@ -594,10 +594,10 @@ fn get_ssh_key(_username: &str) -> Option<PathBuf> {
|
|||
let home_dir = std::env::var("HOME").ok()?;
|
||||
let key_path = std::path::Path::new(&home_dir).join(".ssh").join("id_rsa");
|
||||
if key_path.is_file() {
|
||||
tracing::debug!(path = ?key_path, "found ssh key");
|
||||
tracing::info!(path = ?key_path, "found ssh key");
|
||||
Some(key_path)
|
||||
} else {
|
||||
tracing::debug!(path = ?key_path, "no ssh key found");
|
||||
tracing::info!(path = ?key_path, "no ssh key found");
|
||||
None
|
||||
}
|
||||
}
|
||||
|
|
|
@ -239,7 +239,7 @@ pub fn run_mergetool(
|
|||
|
||||
let mut cmd = Command::new(&editor.program);
|
||||
cmd.args(interpolate_variables(&editor.merge_args, &paths));
|
||||
tracing::debug!(?cmd, "Invoking the external merge tool:");
|
||||
tracing::info!(?cmd, "Invoking the external merge tool:");
|
||||
let exit_status = cmd
|
||||
.status()
|
||||
.map_err(|e| ExternalToolError::FailedToExecute {
|
||||
|
@ -363,7 +363,7 @@ pub fn edit_diff(
|
|||
};
|
||||
let mut cmd = Command::new(&editor.program);
|
||||
cmd.args(interpolate_variables(&editor.edit_args, &patterns));
|
||||
tracing::debug!(?cmd, "Invoking the external diff editor:");
|
||||
tracing::info!(?cmd, "Invoking the external diff editor:");
|
||||
let exit_status = cmd
|
||||
.status()
|
||||
.map_err(|e| ExternalToolError::FailedToExecute {
|
||||
|
|
|
@ -444,5 +444,5 @@ fn test_verbose_logging_enabled() {
|
|||
.split_at(36);
|
||||
// The log format is currently Pretty so we include the terminal markup.
|
||||
// Luckily, insta will print this in colour when reviewing.
|
||||
insta::assert_snapshot!(log_line, @"[34mDEBUG[0m [2mjujutsu::cli_util[0m[2m:[0m verbose logging enabled");
|
||||
insta::assert_snapshot!(log_line, @"[32m INFO[0m [2mjujutsu::cli_util[0m[2m:[0m verbose logging enabled");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue