Skip to content

Commit 332d97d

Browse files
committed
Align <VersionPrefix> & <TargetFrameworks> with Serilog.Extensions.Logging (+ bump up outdated package dependencies)
1 parent b8df615 commit 332d97d

File tree

3 files changed

+13
-15
lines changed

3 files changed

+13
-15
lines changed

src/Serilog.Extensions.Logging.File/Microsoft/Extensions/Logging/FileLoggerExtensions.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
using System;
22
using System.Collections.Generic;
3+
using System.Linq;
34
using Microsoft.Extensions.Configuration;
45
using Serilog;
56
using Serilog.Debugging;
67
using Serilog.Extensions.Logging.File;
7-
using System.Linq;
8+
using Serilog.Formatting;
89
using Serilog.Formatting.Compact;
910
using Serilog.Formatting.Display;
10-
using Serilog.Formatting;
1111

1212
namespace Microsoft.Extensions.Logging
1313
{
@@ -44,7 +44,7 @@ public static ILoggerFactory AddFile(this ILoggerFactory loggerFactory, IConfigu
4444
/// Adds a file logger initialized from the supplied configuration section.
4545
/// </summary>
4646
/// <param name="loggerFactory">The logger factory.</param>
47-
/// <param name="pathFormat">Filname to write. The filename may include {Date} to specify how the date portion of the
47+
/// <param name="pathFormat">Filname to write. The filename may include {Date} to specify how the date portion of the
4848
/// filename is calculated. May include environment variables.</param>
4949
/// <param name="minimumLevel">The level below which events will be suppressed (the default is <see cref="LogLevel.Information"/>).</param>
5050
/// <param name="levelOverrides">A dictionary mapping logger name prefixes to minimum logging levels.</param>
@@ -98,7 +98,7 @@ public static ILoggingBuilder AddFile(this ILoggingBuilder loggingBuilder, IConf
9898
/// Adds a file logger initialized from the supplied configuration section.
9999
/// </summary>
100100
/// <param name="loggingBuilder">The logging builder.</param>
101-
/// <param name="pathFormat">Filname to write. The filename may include {Date} to specify how the date portion of the
101+
/// <param name="pathFormat">Filname to write. The filename may include {Date} to specify how the date portion of the
102102
/// filename is calculated. May include environment variables.</param>
103103
/// <param name="minimumLevel">The level below which events will be suppressed (the default is <see cref="LogLevel.Information"/>).</param>
104104
/// <param name="levelOverrides">A dictionary mapping logger name prefixes to minimum logging levels.</param>
@@ -143,7 +143,7 @@ private static Serilog.Core.Logger CreateLogger(string pathFormat,
143143
var configuration = new LoggerConfiguration()
144144
.MinimumLevel.Is(Conversions.MicrosoftToSerilogLevel(minimumLevel))
145145
.Enrich.FromLogContext()
146-
.WriteTo.Async(w => w.RollingFile(
146+
.WriteTo.Async(w => w.File(
147147
formatter,
148148
Environment.ExpandEnvironmentVariables(pathFormat),
149149
fileSizeLimitBytes: fileSizeLimitBytes,

src/Serilog.Extensions.Logging.File/Serilog.Extensions.Logging.File.csproj

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
44
<Description>Add file logging to ASP.NET Core apps with one line of code.</Description>
5-
<VersionPrefix>2.0.0</VersionPrefix>
5+
<VersionPrefix>3.1.1</VersionPrefix>
66
<Authors>Serilog Contributors</Authors>
7-
<TargetFrameworks>net461;netstandard2.0</TargetFrameworks>
7+
<TargetFrameworks>netstandard2.0</TargetFrameworks>
88
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
99
<GenerateDocumentationFile>true</GenerateDocumentationFile>
1010
<AssemblyName>Serilog.Extensions.Logging.File</AssemblyName>
@@ -25,13 +25,11 @@
2525
</PropertyGroup>
2626

2727
<ItemGroup>
28-
<PackageReference Include="Serilog" Version="2.5.0" />
29-
<PackageReference Include="Serilog.Sinks.RollingFile" Version="3.3.0" />
30-
<PackageReference Include="Serilog.Formatting.Compact" Version="1.0.0" />
31-
<PackageReference Include="Serilog.Extensions.Logging" Version="2.0.2" />
32-
<PackageReference Include="Serilog.Sinks.Async" Version="1.1.0" />
28+
<PackageReference Include="Serilog.Sinks.Async" Version="1.5.0" />
29+
<PackageReference Include="Serilog.Sinks.File" Version="5.0.0" />
30+
<PackageReference Include="Serilog.Extensions.Logging" Version="3.1.0" />
31+
<PackageReference Include="Serilog.Formatting.Compact" Version="1.1.0" />
3332
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="2.0.0" />
34-
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="2.0.0" />
3533
</ItemGroup>
3634

3735
</Project>

test/Serilog.Extensions.Logging.File.Tests/Serilog.Extensions.Logging.File.Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net461;netcoreapp2.0</TargetFrameworks>
4+
<TargetFrameworks>netcoreapp2.0;net472</TargetFrameworks>
55
<AssemblyName>Serilog.Extensions.Logging.File.Tests</AssemblyName>
66
<AssemblyOriginatorKeyFile>../../assets/Serilog.snk</AssemblyOriginatorKeyFile>
77
<SignAssembly>true</SignAssembly>

0 commit comments

Comments
 (0)