lucascebertin / Serilog.Sinks.Oracle

Sink for Serilog, flushes logs on Oracle
MIT License
17 stars 13 forks source link

Unable to customize stored columns #3

Open forrestab opened 5 years ago

forrestab commented 5 years ago

I am trying avoid storing certain columns in the db (i.e. MessageTemplate) and was looking for something similar to the MSSQL sink's removeStandardColumns configuration. I noticed the ColumnOptions.Store property and hoped that all I had to do was provide the standard columns that I wanted stored based on the properties set logic, but in doing so it throws this exception:

System.Data.DuplicateNameException: A column named 'MESSAGE' already belongs to this DataTable. at System.Data.DataColumnCollection.RegisterColumnName(String name, DataColumn column) at System.Data.DataColumnCollection.BaseAdd(DataColumn column) at System.Data.DataColumnCollection.AddAt(Int32 index, DataColumn column) at Serilog.Sinks.Oracle.Database.CreateDataTable() at Serilog.Sinks.Oracle.Database.FillDataTable(IEnumerable1 events) at Serilog.Sinks.Oracle.Database.StoreLogAsync(IEnumerable1 events)The program '[34640] iisexpress.exe' has exited with code -1 (0xffffffff).

Am I trying to use this incorrectly?

lucascebertin commented 5 years ago

Hey, I'll look that on this week and get back with an answer!