Skip to content

Commit

Permalink
Update Exception Logging (#6671)
Browse files Browse the repository at this point in the history
* adding thoughts, it won't work though because of deprecated function

* add a call to addsimpleconsole
  • Loading branch information
scbedd authored Aug 4, 2023
1 parent d8ab868 commit be8d5b4
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions tools/test-proxy/Azure.Sdk.Tools.TestProxy/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
using System.Linq;
using System.CommandLine;
using Azure.Sdk.Tools.TestProxy.CommandOptions;
using Microsoft.AspNetCore.Identity;
using Microsoft.CodeAnalysis.VisualBasic.Syntax;
using System.Text.Json;
using Microsoft.Extensions.Logging.Console;
using Microsoft.Extensions.Options;

namespace Azure.Sdk.Tools.TestProxy
{
Expand Down Expand Up @@ -147,9 +147,12 @@ private static void StartServer(StartOptions startOptions)
{
loggingBuilder.ClearProviders();
loggingBuilder.AddConfiguration(hostBuilder.Configuration.GetSection("Logging"));
loggingBuilder.AddSimpleConsole(formatterOptions =>
loggingBuilder.AddConsole(options =>
{
formatterOptions.TimestampFormat = "[HH:mm:ss] ";
options.LogToStandardErrorThreshold = LogLevel.Error;
}).AddSimpleConsole(options =>
{
options.TimestampFormat = "[HH:mm:ss] ";
});
loggingBuilder.AddDebug();
loggingBuilder.AddEventSourceLogger();
Expand Down

0 comments on commit be8d5b4

Please sign in to comment.