Skip to content
This repository was archived by the owner on Dec 5, 2024. It is now read-only.

Commit 9d63201

Browse files
authored
Merge pull request #152 from github-for-unity/fixes/log-debug-to-trace
Tweaking log messages
2 parents 88adbf1 + 1085e42 commit 9d63201

File tree

6 files changed

+9
-9
lines changed

6 files changed

+9
-9
lines changed

src/GitHub.Api/Authentication/LoginManager.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ public async Task<LoginResultData> Login(
9494
if (e is TwoFactorRequiredException)
9595
{
9696
result = LoginResultCodes.CodeRequired;
97-
logger.Debug("2FA TwoFactorAuthorizationException: {0} {1}", LoginResultCodes.CodeRequired, e.Message);
97+
logger.Trace("2FA TwoFactorAuthorizationException: {0} {1}", LoginResultCodes.CodeRequired, e.Message);
9898
}
9999
else
100100
{
@@ -166,21 +166,21 @@ public async Task<LoginResultData> ContinueLogin(LoginResultData loginResultData
166166
}
167167
catch (TwoFactorAuthorizationException e)
168168
{
169-
logger.Debug(e, "2FA TwoFactorAuthorizationException: {0} {1}", LoginResultCodes.CodeFailed, e.Message);
169+
logger.Trace(e, "2FA TwoFactorAuthorizationException: {0} {1}", LoginResultCodes.CodeFailed, e.Message);
170170

171171
return new LoginResultData(LoginResultCodes.CodeFailed, Localization.Wrong2faCode, client, host, newAuth);
172172
}
173173
catch (ApiValidationException e)
174174
{
175-
logger.Debug(e, "2FA ApiValidationException: {0}", e.Message);
175+
logger.Trace(e, "2FA ApiValidationException: {0}", e.Message);
176176

177177
var message = e.ApiError.FirstErrorMessageSafe();
178178
await keychain.Clear(host, false);
179179
return new LoginResultData(LoginResultCodes.Failed, message, host);
180180
}
181181
catch (Exception e)
182182
{
183-
logger.Debug(e, "Exception: {0}", e.Message);
183+
logger.Trace(e, "Exception: {0}", e.Message);
184184

185185
await keychain.Clear(host, false);
186186
return new LoginResultData(LoginResultCodes.Failed, e.Message, host);

src/GitHub.Api/Events/RepositoryWatcher.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public void Start()
7171
{
7272
if (disableNative)
7373
{
74-
Logger.Debug("Native interface is disabled");
74+
Logger.Trace("Native interface is disabled");
7575
return;
7676
}
7777

src/GitHub.Api/OutputProcessors/LockOutputProcessor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public override void LineReceived(string line)
2929
{
3030
return;
3131
}
32-
Logger.Debug(line);
32+
Logger.Trace(line);
3333
var path = proc.ReadUntil('\t').Trim();
3434
var user = proc.ReadUntilLast("ID:").Trim();
3535
proc.MoveToAfter("ID:");

src/UnityExtension/Assets/Editor/GitHub.Unity/Misc/Installer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ private static void MoveFrom(string path)
3131
{
3232
try
3333
{
34-
logger.Debug("Installer move from '{0}'", path);
34+
logger.Trace("Installer move from '{0}'", path);
3535
// TODO: Create the necessary structure and perform the actual move of files into it from the given install path
3636
}
3737
catch (Exception e)

src/UnityExtension/Assets/Editor/GitHub.Unity/ScriptObjectSingleton.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ private static NPath GetFilePath()
115115
var attr = typeof(T).GetCustomAttributes(true)
116116
.Select(t => t as LocationAttribute)
117117
.FirstOrDefault(t => t != null);
118-
Logging.Instance.Debug("FilePath {0}", attr != null ? attr.filepath : null);
118+
//Logging.Instance.Debug("FilePath {0}", attr != null ? attr.filepath : null);
119119

120120
return attr != null ? attr.filepath.ToNPath() : null;
121121
}

src/UnityExtension/Assets/Editor/GitHub.Unity/UI/SettingsView.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -703,7 +703,7 @@ private void ForceUnlockFile(object obj)
703703

704704
private void Init()
705705
{
706-
Logger.Debug("TODO: Init '{0}'", initDirectory);
706+
//Logger.Debug("TODO: Init '{0}'", initDirectory);
707707
}
708708
}
709709
}

0 commit comments

Comments
 (0)