You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please clearly describe what the SQL Sink is doing incorrectly:
.Net 8.0 API build correctly but when trying to debug in visual studio (F5) this is the exception:
CultureNotFoundException: Only the invariant culture is supported in globalization-invariant mode. See https://aka.ms/GlobalizationInvariantMode for more information. (Parameter 'name')
en-us is an invalid culture identifier.
Please clearly describe the expected behavior:
Have logs saved in database table
List the names and versions of all Serilog packages used in the project:
Serilog.AspNetCore: 8.0.0
Serilog.Settings.Configuration: 8.0.0
Serilog.Sinks.MSSqlServer: 6.5.0
Serilog.Sinks.Console: 5.0.1
Serilog.Sinks.File: 5.0.0
Target framework and operating system:
.NET 8
OS: Windows
Provide a simple reproduction of your Serilog configuration code:
Provide a simple reproduction of your application code:
Program.cs
using Serilog;
var builder = WebApplication.CreateBuilder(args);
//Add support to logging with SERILOG
builder.Host.UseSerilog((context, configuration) => configuration.ReadFrom.Configuration(context.Configuration));
builder.Services.AddControllers();
// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen();
var app = builder.Build();
app.UseHttpsRedirection();
//Add support to logging request with SERILOG
app.UseSerilogRequestLogging();
app.UseAuthorization();
app.MapControllers();
app.Run();
The text was updated successfully, but these errors were encountered:
I don't have any issues running locally. But I am getting that same error trying to run my API using this sink in docker. My project file does not have that property.
@nitewulf I could not reproduce the described problem. Do you have a full stack trace and perhaps a minimal but complete sample project for us to reproduce the exception?
.Net 8.0 API build correctly but when trying to debug in visual studio (F5) this is the exception:
Have logs saved in database table
appsettings.json
The text was updated successfully, but these errors were encountered: