Skip to content

Commit

Permalink
Merge pull request #655 from bcgov/DIAM-209-net90
Browse files Browse the repository at this point in the history
Remove seq logging
  • Loading branch information
leewrigh authored Oct 8, 2024
2 parents 6b0b351 + 6e61e2f commit d5e1e8a
Show file tree
Hide file tree
Showing 8 changed files with 7 additions and 81 deletions.
12 changes: 0 additions & 12 deletions backend/ApprovalFlow/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,17 +56,6 @@ private static void CreateLogger(
splunkToken ??= config.GetValue<string>("SplunkConfig:CollectorToken");



var seqEndpoint = Environment.GetEnvironmentVariable("Seq__Url");
seqEndpoint ??= config.GetValue<string>("Seq:Url");

if (string.IsNullOrEmpty(seqEndpoint))
{
Console.WriteLine("SEQ Log Host is not configured - check Seq environment");
Environment.Exit(100);
}


try
{
if (ApprovalFlowConfiguration.IsDevelopment())
Expand All @@ -93,7 +82,6 @@ private static void CreateLogger(
.Enrich.WithMachineName()
.Enrich.WithProperty("Assembly", $"{name.Name}")
.Enrich.WithProperty("Version", $"{name.Version}")
.WriteTo.Seq(seqEndpoint)
.WriteTo.Console(
outputTemplate: outputTemplate,
theme: AnsiConsoleTheme.Code)
Expand Down
11 changes: 2 additions & 9 deletions backend/NotificationService/Program.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
namespace NotificationService;


using System.Reflection;
using Serilog;
using Serilog.Events;
using Serilog.Formatting.Json;
using Serilog.Sinks.SystemConsole.Themes;
using System.Reflection;

public class Program
{
Expand Down Expand Up @@ -51,21 +51,14 @@ private static void CreateLogger()
.AddJsonFile($"appsettings.{environmentName}.json", optional: true)
.Build();

var seqEndpoint = Environment.GetEnvironmentVariable("Seq__Url");
seqEndpoint ??= config.GetValue<string>("Seq:Url");


var splunkHost = Environment.GetEnvironmentVariable("SplunkConfig__Host");
splunkHost ??= config.GetValue<string>("SplunkConfig:Host");
var splunkToken = Environment.GetEnvironmentVariable("SplunkConfig__CollectorToken");
splunkToken ??= config.GetValue<string>("SplunkConfig:CollectorToken");


if (string.IsNullOrEmpty(seqEndpoint))
{
Console.WriteLine("SEQ Log Host is not configured - check Seq environment");
Environment.Exit(100);
}

try
{
if (NotificationServiceConfiguration.IsDevelopment())
Expand Down
1 change: 0 additions & 1 deletion backend/common/Common.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@
<PackageReference Include="Serilog.Sinks.Splunk" Version="5.0.1" />

<PackageReference Include="Serilog.Sinks.Console" Version="6.0.0" />
<PackageReference Include="Serilog.Sinks.Seq" Version="8.0.0" />
<PackageReference Include="Swashbuckle.AspNetCore.Annotations" Version="6.8.1" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.8.1" />

Expand Down
13 changes: 0 additions & 13 deletions backend/edt.casemanagement/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,18 +56,6 @@ private static void CreateLogger(
var splunkToken = Environment.GetEnvironmentVariable("SplunkConfig__CollectorToken");
splunkToken ??= config.GetValue<string>("SplunkConfig:CollectorToken");



var seqEndpoint = Environment.GetEnvironmentVariable("Seq__Url");
seqEndpoint ??= config.GetValue<string>("Seq:Url");

if (string.IsNullOrEmpty(seqEndpoint))
{
Console.WriteLine("SEQ Log Host is not configured - check Seq environment");
Environment.Exit(100);
}


try
{
if (EdtServiceConfiguration.IsDevelopment())
Expand All @@ -94,7 +82,6 @@ private static void CreateLogger(
.Enrich.WithMachineName()
.Enrich.WithProperty("Assembly", $"{name.Name}")
.Enrich.WithProperty("Version", $"{name.Version}")
.WriteTo.Seq(seqEndpoint)
.WriteTo.Console(
outputTemplate: outputTemplate,
theme: AnsiConsoleTheme.Code)
Expand Down
11 changes: 0 additions & 11 deletions backend/edt.disclosure/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,17 +56,6 @@ private static void CreateLogger(
splunkToken ??= config.GetValue<string>("SplunkConfig:CollectorToken");



var seqEndpoint = Environment.GetEnvironmentVariable("Seq__Url");
seqEndpoint ??= config.GetValue<string>("Seq:Url");

if (string.IsNullOrEmpty(seqEndpoint))
{
Console.WriteLine("SEQ Log Host is not configured - check Seq environment");
Environment.Exit(100);
}


try
{
if (EdtDisclosureServiceConfiguration.IsDevelopment())
Expand Down
15 changes: 1 addition & 14 deletions backend/jumwebapi/Program.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
namespace jumwebapi;

using System.Reflection;
using jumwebapi.Data.Extensions;
using jumwebapi.Infrastructure.Auth;
using Serilog;
using Serilog.Events;
using Serilog.Formatting.Json;
using Serilog.Sinks.SystemConsole.Themes;
using System.Reflection;

public class Program
{
Expand Down Expand Up @@ -60,18 +60,6 @@ private static void CreateLogger()
var splunkToken = Environment.GetEnvironmentVariable("SplunkConfig__CollectorToken");
splunkToken ??= config.GetValue<string>("SplunkConfig:CollectorToken");

var seqEndpoint = Environment.GetEnvironmentVariable("Seq__Url");
seqEndpoint ??= config.GetValue<string>("Seq:Url");

if (string.IsNullOrEmpty(seqEndpoint))
{
Console.WriteLine("SEQ Log Host is not configured - check Seq environment");
Environment.Exit(100);
}




try
{
if (JumWebApiConfiguration.IsDevelopment())
Expand Down Expand Up @@ -99,7 +87,6 @@ private static void CreateLogger()
.Enrich.WithMachineName()
.Enrich.WithProperty("Assembly", $"{name.Name}")
.Enrich.WithProperty("Version", $"{name.Version}")
.WriteTo.Seq(seqEndpoint)
.WriteTo.Console(
outputTemplate: outputTemplate,
theme: AnsiConsoleTheme.Code)
Expand Down
10 changes: 0 additions & 10 deletions backend/service.edt/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,6 @@ private static void CreateLogger(
var splunkToken = Environment.GetEnvironmentVariable("SplunkConfig__CollectorToken");
splunkToken ??= config.GetValue<string>("SplunkConfig:CollectorToken");

var seqEndpoint = Environment.GetEnvironmentVariable("Seq__Url");
seqEndpoint ??= config.GetValue<string>("Seq:Url");

if (string.IsNullOrEmpty(seqEndpoint))
{
Console.WriteLine("SEQ Log Host is not configured - check Seq environment");
Environment.Exit(100);
}


try
{
Expand Down Expand Up @@ -93,7 +84,6 @@ private static void CreateLogger(
.Enrich.WithMachineName()
.Enrich.WithProperty("Assembly", $"{name.Name}")
.Enrich.WithProperty("Version", $"{name.Version}")
.WriteTo.Seq(seqEndpoint)
.WriteTo.Console(
outputTemplate: outputTemplate,
theme: AnsiConsoleTheme.Code)
Expand Down
15 changes: 4 additions & 11 deletions backend/services.plr-intake/Startup.cs
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
namespace PlrIntake;

using FluentValidation.AspNetCore;
using Microsoft.EntityFrameworkCore;
using Serilog;
using SoapCore;
using System.Reflection;
using System.ServiceModel;
using System.Text.Json;

using FluentValidation.AspNetCore;
using Microsoft.EntityFrameworkCore;
using PlrIntake.Data;
using PlrIntake.Features;
using PlrIntake.Features.Intake;
using Serilog;
using SoapCore;

public class Startup
{
Expand Down Expand Up @@ -81,11 +80,5 @@ public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
}
};

app.UseEndpoints(endpoints =>
{
endpoints.UseSoapEndpoint<IIntakeService>("/api/PLRHL7", intakeBinding, SoapSerializer.XmlSerializer);
endpoints.MapControllers();
endpoints.MapHealthChecks("/health/liveness").AllowAnonymous();
});
}
}

0 comments on commit d5e1e8a

Please sign in to comment.