private void SetupTest(Serilog.Sinks.MSSqlServer.ColumnOptions options, DateTimeOffset testDateTimeOffset)
 {
     this.traits = new MSSqlServerSinkTraits("connectionString", "tableName", "schemaName",
                                             options, CultureInfo.InvariantCulture, false);
     this.logEvent = new LogEvent(testDateTimeOffset, LogEventLevel.Information, null,
                                  new MessageTemplate(new List <MessageTemplateToken>()), new List <LogEventProperty>());
 }
Beispiel #2
0
 private void SetupTest()
 {
     _testColumnOptions = new Serilog.Sinks.MSSqlServer.ColumnOptions();
     _testColumnOptions.Store.Add(StandardColumn.LogEvent);
     _testTraits = new MSSqlServerSinkTraits("ConnectionString", "TableName", "SchemaName", _testColumnOptions,
                                             formatProvider: null, autoCreateSqlTable: false, logEventFormatter: null);
     _sut = new JsonLogEventFormatter(_testTraits);
 }
Beispiel #3
0
 /// <summary>
 /// Constructor. A reference to the parent Traits object is used so that JSON
 /// can serialize Standard Column values exactly the way they would be written
 /// to discrete SQL columns.
 /// </summary>
 public JsonLogEventFormatter(MSSqlServerSinkTraits parent)
 {
     _traits = parent;
 }