Is there any way to change the default schema to something other than dbo? I am developing a CORE 2.0 web api and using MSSqlServer as sink. Tried adding "Schema": "Log" in the appsettings.json file, and it does not work.
Thanks
Is there any way to change the default schema to something other than dbo? I am developing a CORE 2.0 web api and using MSSqlServer as sink. Tried adding "Schema": "Log" in the appsettings.json file, and it does not work.
Thanks
Use schemaName property in configuration
"Args": { "connectionString": ***, "tableName": "Logs", "schemaName": "aclibi" }
https://github.com/serilog/serilog-sinks-mssqlserver/issues/63
The MSSqlServer sink can take an optional parameter "schemaName":
Log.Logger = new LoggerConfiguration()
.WriteTo.MSSqlServer(connectionString, "MyLogs", schemaName: "myschema")
.CreateLogger();
See the MSSqlServer sink configuration options documentation for more information.