diff --git a/src/NadekoBot/Modules/Administration/Commands/ServerGreetCommands.cs b/src/NadekoBot/Modules/Administration/Commands/ServerGreetCommands.cs index 7c58fbfd..b3f79c83 100644 --- a/src/NadekoBot/Modules/Administration/Commands/ServerGreetCommands.cs +++ b/src/NadekoBot/Modules/Administration/Commands/ServerGreetCommands.cs @@ -53,7 +53,7 @@ namespace NadekoBot.Modules.Administration }; } - private static Logger _log { get; } + private new static Logger _log { get; } private static ConcurrentDictionary GuildConfigsCache { get; } = new ConcurrentDictionary(); diff --git a/src/NadekoBot/Modules/Games/Commands/PlantAndPickCommands.cs b/src/NadekoBot/Modules/Games/Commands/PlantAndPickCommands.cs index 43cbf52f..ba98f5f1 100644 --- a/src/NadekoBot/Modules/Games/Commands/PlantAndPickCommands.cs +++ b/src/NadekoBot/Modules/Games/Commands/PlantAndPickCommands.cs @@ -37,13 +37,8 @@ namespace NadekoBot.Modules.Games //channelId/last generation private static ConcurrentDictionary lastGenerations { get; } = new ConcurrentDictionary(); - private static ConcurrentHashSet usersRecentlyPicked { get; } = new ConcurrentHashSet(); - - private static Logger _log { get; } - static PlantPickCommands() { - _log = LogManager.GetCurrentClassLogger(); #if !GLOBAL_NADEKO NadekoBot.Client.MessageReceived += PotentialFlowerGeneration; @@ -116,7 +111,7 @@ namespace NadekoBot.Modules.Games } catch (Exception ex) { - _log.Warn(ex); + LogManager.GetCurrentClassLogger().Warn(ex); } }); return Task.CompletedTask; diff --git a/src/NadekoBot/NadekoBot.cs b/src/NadekoBot/NadekoBot.cs index 5df52a6e..21752102 100644 --- a/src/NadekoBot/NadekoBot.cs +++ b/src/NadekoBot/NadekoBot.cs @@ -14,6 +14,7 @@ using System.Collections.Generic; using NadekoBot.Modules.Permissions; using NadekoBot.TypeReaders; using System.Collections.Concurrent; +using System.Diagnostics; using NadekoBot.Modules.Music; using NadekoBot.Services.Database.Models; using System.Resources; @@ -108,13 +109,16 @@ namespace NadekoBot CommandService.AddTypeReader(new ModuleTypeReader()); CommandService.AddTypeReader(new GuildTypeReader()); + + var sw = Stopwatch.StartNew(); //connect await Client.LoginAsync(TokenType.Bot, Credentials.Token).ConfigureAwait(false); await Client.ConnectAsync().ConfigureAwait(false); //await Client.DownloadAllUsersAsync().ConfigureAwait(false); Stats.Initialize(); - _log.Info("Connected"); + sw.Stop(); + _log.Info("Connected in " + sw.Elapsed.TotalSeconds.ToString("F2")); //load commands and prefixes