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
{
public class Constants
public static class Constants
{
public const string Name = "Geekbot";

View file

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