Questions tagged [serilog-sinks-mssqlserver]

5 questions
3
votes
1 answer

Serilog audit log using sub-logger

I'm trying to use Serilog to write an audit log for a subset of log events. That is, of all the events which are logged, a subset should be logged using a sub-logger to my chosen sink(s) and if it fails, I want it to fail noisily with an…
Mark Embling
  • 12,605
  • 8
  • 39
  • 53
0
votes
0 answers

Is it a good practice to use nvarchar(max) or varchar(max) in Serilog SQL Server logging?

I'm implementing a custom log table for Serilog SQL Server database logging. I notice that almost all text columns are default to nvarchar(max). I know varchar should be sufficient for us but are not sure if there is a need for messages to exceed…
0
votes
0 answers

.Net Core Serilog MSSQLServer Sink addAdditionalColumns to existing table

I'm trying to add some new columns to my existing log. It only works if I remove the table completely and it generates a new one for me with all the columns.. If I try to tack on some new columns in the json configuration. It doesn't create it. …
0
votes
1 answer

Properties added to LogContext are gone when logging in Middleware

In my application I use serilog to log to DB with some custom columns. { "Name": "MSSqlServer", "Args": { "connectionString": "ApplicationDbContext", "tableName": "Logs", "autoCreateSqlTable":…
0
votes
0 answers

Can't get serilog to log to sqlserver

Help Why can't I get serilog to log to sqlserver I have used forever to get this to work It logs fine to the console I have installed the nuget packages Serilog Serilog.Sinks.Console Serilog.Sinks.MSSqlServer //First a quick test if the connection…
Aj.son
  • 13
  • 5