Skip to content

Commit

Permalink
Bump Serilog.AspNetCore from 7.0.0 to 8.0.0 (#1836)
Browse files Browse the repository at this point in the history
* Bump Serilog.AspNetCore from 7.0.0 to 8.0.0

Bumps [Serilog.AspNetCore](https://github.com/serilog/serilog-aspnetcore) from 7.0.0 to 8.0.0.
- [Release notes](https://github.com/serilog/serilog-aspnetcore/releases)
- [Commits](serilog/serilog-aspnetcore@v7.0.0...v8.0.0)

---
updated-dependencies:
- dependency-name: Serilog.AspNetCore
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* Use IHostBuilder in proec configuraion

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Millicent Achieng <achieng.milli@gmail.com>
  • Loading branch information
dependabot[bot] and millicentachieng authored Jan 12, 2024
1 parent ac61963 commit d43e706
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion GraphWebApi/GraphWebApi.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.19.6" />
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="7.0.11" />
<PackageReference Include="Serilog" Version="3.1.1" />
<PackageReference Include="Serilog.AspNetCore" Version="7.0.0" />
<PackageReference Include="Serilog.AspNetCore" Version="8.0.0" />
<PackageReference Include="Serilog.Sinks.ApplicationInsights" Version="4.0.0" />
<PackageReference Include="Serilog.Sinks.Console" Version="5.0.1" />
</ItemGroup>
Expand Down
14 changes: 8 additions & 6 deletions GraphWebApi/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public static class Program
{
public static async Task Main(string[] args)
{
var host = CreateWebHostBuilder(args).Build();
var host = CreateHostBuilder(args).Build();
var telemetryConfiguration = host.Services.GetRequiredService<TelemetryConfiguration>();

Log.Logger = new LoggerConfiguration()
Expand Down Expand Up @@ -45,10 +45,12 @@ public static async Task Main(string[] args)
}
}

public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
WebHost.CreateDefaultBuilder(args)
.UseStartup<Startup>()
.UseSerilog();

public static IHostBuilder CreateHostBuilder(string[] args) =>
Host.CreateDefaultBuilder(args)
.ConfigureWebHostDefaults(webBuilder =>
{
webBuilder.UseStartup<Startup>();
})
.UseSerilog();
}
}

0 comments on commit d43e706

Please sign in to comment.