mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 10:17:22 +01:00
chore: load log level from config on debug builds
This commit is contained in:
parent
e3977f9493
commit
d8ad2a8863
2 changed files with 0 additions and 6 deletions
|
|
@ -174,10 +174,6 @@ namespace Dalamud.Injector
|
||||||
|
|
||||||
private static void InitLogging(bool verbose, IEnumerable<string> args)
|
private static void InitLogging(bool verbose, IEnumerable<string> args)
|
||||||
{
|
{
|
||||||
#if DEBUG
|
|
||||||
verbose = true;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
var levelSwitch = new LoggingLevelSwitch
|
var levelSwitch = new LoggingLevelSwitch
|
||||||
{
|
{
|
||||||
MinimumLevel = verbose ? LogEventLevel.Verbose : LogEventLevel.Information,
|
MinimumLevel = verbose ? LogEventLevel.Verbose : LogEventLevel.Information,
|
||||||
|
|
|
||||||
|
|
@ -147,11 +147,9 @@ public sealed class EntryPoint
|
||||||
var configuration = DalamudConfiguration.Load(info.ConfigurationPath!);
|
var configuration = DalamudConfiguration.Load(info.ConfigurationPath!);
|
||||||
|
|
||||||
// Set the appropriate logging level from the configuration
|
// Set the appropriate logging level from the configuration
|
||||||
#if !DEBUG
|
|
||||||
if (!configuration.LogSynchronously)
|
if (!configuration.LogSynchronously)
|
||||||
InitLogging(info.WorkingDirectory!, info.BootShowConsole, configuration.LogSynchronously, info.LogName);
|
InitLogging(info.WorkingDirectory!, info.BootShowConsole, configuration.LogSynchronously, info.LogName);
|
||||||
LogLevelSwitch.MinimumLevel = configuration.LogLevel;
|
LogLevelSwitch.MinimumLevel = configuration.LogLevel;
|
||||||
#endif
|
|
||||||
|
|
||||||
// Log any unhandled exception.
|
// Log any unhandled exception.
|
||||||
AppDomain.CurrentDomain.UnhandledException += OnUnhandledException;
|
AppDomain.CurrentDomain.UnhandledException += OnUnhandledException;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue