Browse Source

Replace loglevel with loggerfactory in config

pull/1765/head
Waterball 4 years ago
parent
commit
314bb573b3
2 changed files with 5 additions and 12 deletions
  1. +2
    -4
      src/Discord.Net.Commands/CommandServiceConfig.cs
  2. +3
    -8
      src/Discord.Net.Core/DiscordConfig.cs

+ 2
- 4
src/Discord.Net.Commands/CommandServiceConfig.cs View File

@@ -1,3 +1,4 @@
using Microsoft.Extensions.Logging;
using System.Collections.Generic;

namespace Discord.Commands
@@ -23,10 +24,7 @@ namespace Discord.Commands
/// </summary>
public bool CaseSensitiveCommands { get; set; } = false;

/// <summary>
/// Gets or sets the minimum log level severity that will be sent to the <see cref="CommandService.Log"/> event.
/// </summary>
public LogSeverity LogLevel { get; set; } = LogSeverity.Info;
public ILoggerFactory LoggerFactory { get; set; }

/// <summary>
/// Gets or sets whether <see cref="RunMode.Sync"/> commands should push exceptions up to the caller.


+ 3
- 8
src/Discord.Net.Core/DiscordConfig.cs View File

@@ -1,3 +1,4 @@
using Microsoft.Extensions.Logging;
using System.Reflection;

namespace Discord
@@ -123,14 +124,8 @@ namespace Discord
/// The currently set <see cref="RetryMode"/>.
/// </returns>
public RetryMode DefaultRetryMode { get; set; } = RetryMode.AlwaysRetry;

/// <summary>
/// Gets or sets the minimum log level severity that will be sent to the Log event.
/// </summary>
/// <returns>
/// The currently set <see cref="LogSeverity"/> for logging level.
/// </returns>
public LogSeverity LogLevel { get; set; } = LogSeverity.Info;
public ILoggerFactory LoggerFactory { get; set; }

/// <summary>
/// Gets or sets whether the initial log entry should be printed.


Loading…
Cancel
Save