Browse Source

Removed DiscordRpcClient's second log header

tags/1.0-rc
RogueException 8 years ago
parent
commit
73d4233684
1 changed files with 0 additions and 25 deletions
  1. +0
    -25
      src/Discord.Net/DiscordRpcClient.cs

+ 0
- 25
src/Discord.Net/DiscordRpcClient.cs View File

@@ -27,7 +27,6 @@ namespace Discord
private TaskCompletionSource<bool> _connectTask;
private CancellationTokenSource _cancelToken, _reconnectCancelToken;
private Task _reconnectTask;
private bool _isFirstLogSub;
private bool _isReconnecting;
private bool _canReconnect;

@@ -42,7 +41,6 @@ namespace Discord
: base(config, CreateApiClient(config))
{
_rpcLogger = LogManager.CreateLogger("RPC");
_isFirstLogSub = true;

_serializer = new JsonSerializer { ContractResolver = new DiscordContractResolver() };
_serializer.Error += (s, e) =>
@@ -98,12 +96,6 @@ namespace Discord
if (!isReconnecting && _reconnectCancelToken != null && !_reconnectCancelToken.IsCancellationRequested)
_reconnectCancelToken.Cancel();

if (_isFirstLogSub)
{
_isFirstLogSub = false;
await WriteInitialLog().ConfigureAwait(false);
}

var state = ConnectionState;
if (state == ConnectionState.Connecting || state == ConnectionState.Connected)
await DisconnectInternalAsync(null, isReconnecting).ConfigureAwait(false);
@@ -286,22 +278,5 @@ namespace Discord
return;
}
}

private async Task WriteInitialLog()
{
await _clientLogger.InfoAsync($"DiscordRpcClient v{DiscordRestConfig.Version} (RPC v{DiscordRpcConfig.RpcAPIVersion})").ConfigureAwait(false);
await _clientLogger.VerboseAsync($"Runtime: {RuntimeInformation.FrameworkDescription.Trim()} ({ToArchString(RuntimeInformation.ProcessArchitecture)})").ConfigureAwait(false);
await _clientLogger.VerboseAsync($"OS: {RuntimeInformation.OSDescription.Trim()} ({ToArchString(RuntimeInformation.OSArchitecture)})").ConfigureAwait(false);
await _clientLogger.VerboseAsync($"Processors: {Environment.ProcessorCount}").ConfigureAwait(false);
}
private static string ToArchString(Architecture arch)
{
switch (arch)
{
case Architecture.X64: return "x64";
case Architecture.X86: return "x86";
default: return arch.ToString();
}
}
}
}

Loading…
Cancel
Save