Don't log to console if running from folder containing 'deploy' in name
This commit is contained in:
parent
70e4cf249f
commit
b6d7e76bdb
1 changed files with 4 additions and 1 deletions
|
@ -9,8 +9,11 @@ namespace Geekbot.net.Lib
|
||||||
public static ILogger createLogger(string[] args)
|
public static ILogger createLogger(string[] args)
|
||||||
{
|
{
|
||||||
var loggerCreation = new LoggerConfiguration()
|
var loggerCreation = new LoggerConfiguration()
|
||||||
.WriteTo.LiterateConsole()
|
|
||||||
.WriteTo.RollingFile("Logs/geekbot-{Date}.txt", shared: true);
|
.WriteTo.RollingFile("Logs/geekbot-{Date}.txt", shared: true);
|
||||||
|
if (!Environment.CurrentDirectory.Contains("deploy"))
|
||||||
|
{
|
||||||
|
loggerCreation.WriteTo.LiterateConsole();
|
||||||
|
}
|
||||||
if (args.Contains("--verbose"))
|
if (args.Contains("--verbose"))
|
||||||
{
|
{
|
||||||
loggerCreation.MinimumLevel.Verbose();
|
loggerCreation.MinimumLevel.Verbose();
|
||||||
|
|
Loading…
Reference in a new issue