diff --git a/Sloth.Api/Logging/LoggingConfiguration.cs b/Sloth.Api/Logging/LoggingConfiguration.cs index c9e480cc..2ca8c3ef 100644 --- a/Sloth.Api/Logging/LoggingConfiguration.cs +++ b/Sloth.Api/Logging/LoggingConfiguration.cs @@ -57,6 +57,12 @@ public static LoggerConfiguration GetConfiguration() logConfig = logConfig .WriteTo.Console(); + // add in stackify sink if the api key is valid + if (!string.IsNullOrEmpty(loggingSection.GetValue("ApiKey"))) + { + logConfig = logConfig.WriteTo.Stackify(); + } + // add in elastic search sink if the uri is valid if (Uri.TryCreate(loggingSection.GetValue("ElasticUrl"), UriKind.Absolute, out var elasticUri)) { diff --git a/Sloth.Api/Sloth.Api.csproj b/Sloth.Api/Sloth.Api.csproj index 73292d64..c27219ee 100644 --- a/Sloth.Api/Sloth.Api.csproj +++ b/Sloth.Api/Sloth.Api.csproj @@ -29,6 +29,7 @@ + diff --git a/Sloth.Jobs.Core/Logging/LoggingConfiguration.cs b/Sloth.Jobs.Core/Logging/LoggingConfiguration.cs index f00dcc6f..6cdb1461 100644 --- a/Sloth.Jobs.Core/Logging/LoggingConfiguration.cs +++ b/Sloth.Jobs.Core/Logging/LoggingConfiguration.cs @@ -63,6 +63,12 @@ public static LoggerConfiguration GetConfiguration() .WriteTo.Console() .WriteToSqlCustom(); + // add in stackify sink if the api key is valid + if (!string.IsNullOrEmpty(loggingSection.GetValue("ApiKey"))) + { + logConfig = logConfig.WriteTo.Stackify(); + } + // add in elastic search sink if the uri is valid if (Uri.TryCreate(loggingSection.GetValue("ElasticUrl"), UriKind.Absolute, out var elasticUri)) { diff --git a/Sloth.Jobs.Core/Sloth.Jobs.Core.csproj b/Sloth.Jobs.Core/Sloth.Jobs.Core.csproj index 94dd246e..b1fcaec6 100644 --- a/Sloth.Jobs.Core/Sloth.Jobs.Core.csproj +++ b/Sloth.Jobs.Core/Sloth.Jobs.Core.csproj @@ -18,6 +18,7 @@ + diff --git a/Sloth.Web/Logging/LoggingConfiguration.cs b/Sloth.Web/Logging/LoggingConfiguration.cs index cbc6ace5..21455c5e 100644 --- a/Sloth.Web/Logging/LoggingConfiguration.cs +++ b/Sloth.Web/Logging/LoggingConfiguration.cs @@ -58,6 +58,12 @@ public static LoggerConfiguration GetConfiguration() logConfig = logConfig .WriteTo.Console(); + // add in stackify sink if the api key is valid + if (!string.IsNullOrEmpty(loggingSection.GetValue("ApiKey"))) + { + logConfig = logConfig.WriteTo.Stackify(); + } + // add in elastic search sink if the uri is valid if (Uri.TryCreate(loggingSection.GetValue("ElasticUrl"), UriKind.Absolute, out var elasticUri)) { diff --git a/Sloth.Web/Sloth.Web.csproj b/Sloth.Web/Sloth.Web.csproj index b3a53beb..8e373590 100644 --- a/Sloth.Web/Sloth.Web.csproj +++ b/Sloth.Web/Sloth.Web.csproj @@ -35,6 +35,7 @@ +