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

Commit 81f08d9

Browse files
Merge pull request #577 from github-for-unity/fixes/names-are-hard
GitHub.Logging naming fixes
2 parents 6912577 + 1cc4800 commit 81f08d9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+157
-155
lines changed

script

src/GitHub.Api/Application/ApiClient.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
using System.Linq;
44
using System.Threading.Tasks;
55
using Octokit;
6-
using GitHub.Unity.Logs;
6+
using GitHub.Logging;
77

88
namespace GitHub.Unity
99
{
@@ -20,7 +20,7 @@ public static IApiClient Create(UriString repositoryUrl, IKeychain keychain)
2020
new GitHubClient(ApplicationConfiguration.ProductHeader, credentialStore, hostAddress.ApiUri));
2121
}
2222

23-
private static readonly ILogging logger = Logging.GetLogger<ApiClient>();
23+
private static readonly ILogging logger = LogHelper.GetLogger<ApiClient>();
2424
public HostAddress HostAddress { get; }
2525
public UriString OriginalUrl { get; }
2626

src/GitHub.Api/Application/ApplicationManagerBase.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
using System.Threading;
44
using System.Threading.Tasks;
55
using System.Collections.Generic;
6-
using GitHub.Unity.Logs;
6+
using GitHub.Logging;
77

88
namespace GitHub.Unity
99
{
1010
abstract class ApplicationManagerBase : IApplicationManager
1111
{
12-
protected static ILogging Logger { get; } = Logging.GetLogger<IApplicationManager>();
12+
protected static ILogging Logger { get; } = LogHelper.GetLogger<IApplicationManager>();
1313

1414
private RepositoryManager repositoryManager;
1515

@@ -36,7 +36,7 @@ protected void Initialize()
3636
LocalSettings.Initialize();
3737
SystemSettings.Initialize();
3838

39-
Logging.TracingEnabled = UserSettings.Get(Constants.TraceLoggingKey, false);
39+
LogHelper.TracingEnabled = UserSettings.Get(Constants.TraceLoggingKey, false);
4040
ProcessManager = new ProcessManager(Environment, Platform.GitEnvironment, CancellationToken);
4141
Platform.Initialize(ProcessManager, TaskManager);
4242
GitClient = new GitClient(Environment, ProcessManager, TaskManager.Token);

src/GitHub.Api/Authentication/Keychain.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
using System.Linq;
44
using System.Threading.Tasks;
55
using Octokit;
6-
using GitHub.Unity.Logs;
6+
using GitHub.Logging;
77

88
namespace GitHub.Unity
99
{
@@ -23,7 +23,7 @@ class Keychain : IKeychain
2323
{
2424
const string ConnectionFile = "connections.json";
2525

26-
private readonly ILogging logger = Logging.GetLogger<Keychain>();
26+
private readonly ILogging logger = LogHelper.GetLogger<Keychain>();
2727

2828
private readonly ICredentialManager credentialManager;
2929
private readonly NPath cachePath;

src/GitHub.Api/Authentication/LoginManager.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
using System.Net;
33
using System.Threading.Tasks;
44
using Octokit;
5-
using GitHub.Unity.Logs;
5+
using GitHub.Logging;
66

77
namespace GitHub.Unity
88
{
@@ -20,7 +20,7 @@ public enum LoginResultCodes
2020
/// </summary>
2121
class LoginManager : ILoginManager
2222
{
23-
private readonly ILogging logger = Logging.GetLogger<LoginManager>();
23+
private readonly ILogging logger = LogHelper.GetLogger<LoginManager>();
2424

2525
private readonly string[] scopes = { "user", "repo", "gist", "write:public_key" };
2626
private readonly IKeychain keychain;

src/GitHub.Api/Events/RepositoryWatcher.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
using System.Threading;
55
using System.Threading.Tasks;
66
using sfw.net;
7-
using GitHub.Unity.Logs;
7+
using GitHub.Logging;
88

99
namespace GitHub.Unity
1010
{
@@ -294,7 +294,7 @@ public void Dispose()
294294
Dispose(true);
295295
}
296296

297-
protected static ILogging Logger { get; } = Logging.GetLogger<RepositoryWatcher>();
297+
protected static ILogging Logger { get; } = LogHelper.GetLogger<RepositoryWatcher>();
298298

299299
private enum EventType
300300
{

src/GitHub.Api/Git/GitClient.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using GitHub.Unity.Logs;
1+
using GitHub.Logging;
22
using System;
33
using System.Collections.Generic;
44
using System.Linq;
@@ -402,7 +402,7 @@ public ITask<string> Unlock(string file, bool force,
402402
.Configure(processManager);
403403
}
404404

405-
protected static ILogging Logger { get; } = Logging.GetLogger<GitClient>();
405+
protected static ILogging Logger { get; } = LogHelper.GetLogger<GitClient>();
406406
}
407407

408408
public struct GitUser

src/GitHub.Api/Git/GitCredentialManager.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using GitHub.Unity.Logs;
1+
using GitHub.Logging;
22
using System;
33
using System.Collections.Generic;
44
using System.Threading.Tasks;
@@ -7,7 +7,7 @@ namespace GitHub.Unity
77
{
88
class GitCredentialManager : ICredentialManager
99
{
10-
private static ILogging Logger { get; } = Logging.GetLogger<GitCredentialManager>();
10+
private static ILogging Logger { get; } = LogHelper.GetLogger<GitCredentialManager>();
1111

1212
private ICredential credential;
1313
private string credHelper = null;

src/GitHub.Api/Git/Repository.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using GitHub.Unity.Logs;
1+
using GitHub.Logging;
22
using System;
33
using System.Collections.Generic;
44
using System.Diagnostics;
@@ -626,7 +626,7 @@ public bool IsGitHub
626626
"{0} Owner: {1} Name: {2} CloneUrl: {3} LocalPath: {4} Branch: {5} Remote: {6}", GetHashCode(), Owner, Name,
627627
CloneUrl, LocalPath, CurrentBranch, CurrentRemote);
628628

629-
protected static ILogging Logger { get; } = Logging.GetLogger<Repository>();
629+
protected static ILogging Logger { get; } = LogHelper.GetLogger<Repository>();
630630
}
631631

632632
public interface IUser
@@ -751,7 +751,7 @@ private void UpdateUserAndEmail()
751751
}).Start();
752752
}
753753

754-
protected static ILogging Logger { get; } = Logging.GetLogger<User>();
754+
protected static ILogging Logger { get; } = LogHelper.GetLogger<User>();
755755
}
756756

757757
[Serializable]

src/GitHub.Api/Git/RepositoryManager.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
using System.Threading;
55
using System.Threading.Tasks;
66
using Octokit;
7-
using GitHub.Unity.Logs;
7+
using GitHub.Logging;
88

99
namespace GitHub.Unity
1010
{
@@ -595,6 +595,6 @@ private set
595595
}
596596
}
597597

598-
protected static ILogging Logger { get; } = Logging.GetLogger<RepositoryManager>();
598+
protected static ILogging Logger { get; } = LogHelper.GetLogger<RepositoryManager>();
599599
}
600600
}

0 commit comments

Comments
 (0)