Make constants static and use non buffered sumologic client

This commit is contained in:
runebaas 2018-05-06 23:28:44 +02:00
parent 4d39850373
commit d671817b0d
No known key found for this signature in database
GPG key ID: 2677AF508D0300D6
2 changed files with 5 additions and 9 deletions

View file

@ -2,7 +2,7 @@
namespace Geekbot.net.Lib namespace Geekbot.net.Lib
{ {
public class Constants public static class Constants
{ {
public const string Name = "Geekbot"; public const string Name = "Geekbot";

View file

@ -18,19 +18,15 @@ namespace Geekbot.net.Lib.Logger
Console.WriteLine("Logging Geekbot Logs to Sumologic"); Console.WriteLine("Logging Geekbot Logs to Sumologic");
config.LoggingRules.Add( config.LoggingRules.Add(
new LoggingRule("*", LogLevel.Debug, LogLevel.Fatal, new LoggingRule("*", LogLevel.Debug, LogLevel.Fatal,
new BufferedSumoLogicTarget() new SumoLogicTarget()
{ {
Url = Environment.GetEnvironmentVariable("GEEKBOT_SUMO"), Url = Environment.GetEnvironmentVariable("GEEKBOT_SUMO"),
SourceName = "GeekbotLogger", SourceName = "GeekbotLogger",
Layout = "${message}", Layout = "${message}",
UseConsoleLog = true, UseConsoleLog = false,
MaxQueueSizeBytes = 500000,
FlushingAccuracy = 250,
MaxFlushInterval = 10000,
OptimizeBufferReuse = true, OptimizeBufferReuse = true,
MessagesPerRequest = 10, Name = "Geekbot",
RetryInterval = 5000, AppendException = false
Name = "Geekbot"
}) })
); );
} }