From b6d7e76bdbb0a69426733abb4d90e4cdb836d264 Mon Sep 17 00:00:00 2001 From: runebaas Date: Mon, 15 Jan 2018 19:31:49 +0100 Subject: [PATCH] Don't log to console if running from folder containing 'deploy' in name --- Geekbot.net/Lib/LoggerFactory.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Geekbot.net/Lib/LoggerFactory.cs b/Geekbot.net/Lib/LoggerFactory.cs index 988c300..d1fe698 100644 --- a/Geekbot.net/Lib/LoggerFactory.cs +++ b/Geekbot.net/Lib/LoggerFactory.cs @@ -9,8 +9,11 @@ namespace Geekbot.net.Lib public static ILogger createLogger(string[] args) { var loggerCreation = new LoggerConfiguration() - .WriteTo.LiterateConsole() .WriteTo.RollingFile("Logs/geekbot-{Date}.txt", shared: true); + if (!Environment.CurrentDirectory.Contains("deploy")) + { + loggerCreation.WriteTo.LiterateConsole(); + } if (args.Contains("--verbose")) { loggerCreation.MinimumLevel.Verbose();