Skip to content

Commit d0d91b6

Browse files
author
John.Jenson
committed
convert timestamp to UTC and specify column type
1 parent 5dcfd68 commit d0d91b6

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/SoCreate.Extensions.Logging/LogAdapters/ActivityLoggerLogConfigurationAdapter.cs

+2
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ public LoggerConfiguration ApplyConfiguration(LoggerConfiguration loggerConfigur
4545
columnOptions.Store.Remove(StandardColumn.Properties);
4646
columnOptions.Store.Remove(StandardColumn.Exception);
4747
columnOptions.Store.Add(StandardColumn.LogEvent);
48+
columnOptions.TimeStamp.DataType = SqlDbType.DateTime2;
49+
columnOptions.TimeStamp.ConvertToUtc = true;
4850
columnOptions.AdditionalColumns = new Collection<SqlColumn>
4951
{
5052
new SqlColumn { ColumnName = "ActivityType", DataType = SqlDbType.VarChar, DataLength = 256 },

src/SoCreate.Extensions.Logging/SoCreate.Extensions.Logging.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<PackageTags>Logging</PackageTags>
1212
<RepositoryType>git</RepositoryType>
1313
<Copyright>© SoCreate. All rights reserved.</Copyright>
14-
<Version>8.0.0</Version>
14+
<Version>8.1.0</Version>
1515
<Nullable>enable</Nullable>
1616
</PropertyGroup>
1717
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">

0 commit comments

Comments
 (0)