From 942d7ffba7d5c301d93d202ef83025231685981b Mon Sep 17 00:00:00 2001 From: Nitix Date: Sat, 10 Sep 2016 23:02:09 +0200 Subject: [PATCH] Add version display while starting Nadeko This will help to troubleshoot errors if someone hasn't the last version of Nadeko --- src/NadekoBot/NadekoBot.cs | 5 ++++- src/NadekoBot/Properties/AssemblyInfo.cs | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/NadekoBot/NadekoBot.cs b/src/NadekoBot/NadekoBot.cs index 081d5c24..38d15dc8 100644 --- a/src/NadekoBot/NadekoBot.cs +++ b/src/NadekoBot/NadekoBot.cs @@ -12,6 +12,7 @@ using System.Diagnostics; using System.Linq; using System.Reflection; using System.Threading.Tasks; +using NLog.Fluent; namespace NadekoBot { @@ -31,6 +32,9 @@ namespace NadekoBot public async Task RunAsync(string[] args) { SetupLogger(); + _log = LogManager.GetCurrentClassLogger(); + + _log.Info("Starting NadekoBot v" + typeof(NadekoBot).GetTypeInfo().Assembly.GetCustomAttribute().InformationalVersion); //create client Client = new DiscordSocketClient(new DiscordSocketConfig @@ -47,7 +51,6 @@ namespace NadekoBot Google = new GoogleApiService(); CommandHandler = new CommandHandler(Client, Commands); Stats = new StatsService(Client, CommandHandler); - _log = LogManager.GetCurrentClassLogger(); //init db using (var context = DbHandler.Instance.GetDbContext()) diff --git a/src/NadekoBot/Properties/AssemblyInfo.cs b/src/NadekoBot/Properties/AssemblyInfo.cs index 7f939e99..9a06963a 100644 --- a/src/NadekoBot/Properties/AssemblyInfo.cs +++ b/src/NadekoBot/Properties/AssemblyInfo.cs @@ -8,6 +8,7 @@ using System.Runtime.InteropServices; [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("NadekoBot")] [assembly: AssemblyTrademark("")] +[assembly: AssemblyInformationalVersion("1.0-alpha")] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from