Skip to content

Instantly share code, notes, and snippets.

View maryamariyan's full-sized avatar
:octocat:
Focusing

Maryam Ariyan maryamariyan

:octocat:
Focusing
  • Vancouver, Canada
View GitHub Profile
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Logging.EventSource;
using System;
using System.Collections.Generic;
using System.Diagnostics.Tracing;
using System.Threading;
using System.Threading.Tasks;
namespace ConsoleApp46
{
class Program
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Logging.EventSource;
using System;
using System.Collections.Generic;
using System.Diagnostics.Tracing;
using System.Threading;
using System.Threading.Tasks;
namespace ConsoleApp46
{
class Program
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Logging.Console;
using Microsoft.Extensions.Logging.EventSource;
using System;
using System.Diagnostics.Tracing;
using System.Threading;
using System.Threading.Tasks;
namespace ConsoleApp46
{
class Program
namespace ConsoleApp46
{
class Program
{
public static async Task Main(string[] args)
{
using var loggerFactory = LoggerFactory.Create(builder =>
{
builder
// current usage which is to be changed:
public class CustomConsoleLogFormatterOptions
{
public string ExtraCustomProperty { get; set; }
}
internal class CustomConsoleLogFormatterOptionsSetup : ConfigureFromConfigurationOptions<CustomConsoleLogFormatterOptions>
{
public CustomConsoleLogFormatterOptionsSetup(ILoggerProviderConfiguration<CustomConsoleLogFormatter>
providerConfiguration)
: base(providerConfiguration.Configuration)
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<!-- NOTE: Leave this file here and keep it in sync with list in dir.props. -->
<!-- The command-line doesn't need it, but the IDE does. -->
<packageSources>
<clear/>
<add key="myget.org dotnet-core" value="https://dotnet.myget.org/F/dotnet-core/api/v3/index.json" />
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
</packageSources>
</configuration>