-
Notifications
You must be signed in to change notification settings - Fork 149
Closed
Labels
Description
In the recent changes to support custom column names, it seems the support for storing Level as an enum was broken. (See commit cdd7999 changes to /src/Serilog.Sinks.MSSqlServer/Sinks/MSSqlServer/MSSqlServerSink.cs)
I believe this can be fixed by changing the value of the MaxLength property from 0 to -1 when StoreAsEnum is true, as a value of 0 causes ADO.Net to barf with an exception about non-string datatypes and non-negative MaxLength not being supported. (How's that for triple-negation!)
The functionality works in version 4.0.0 of the Nuget package, but not in version 4.1.0
Thanks in advance!