Files
Nebula-Auth/NebulaAuth/Model/Shell.cs
T
Давид Чернопятов 1e65cd4a06 1.5.3 progress. Added multi-confirmation and code refactorings
NebulaAuth:
- Added MAAC and PortableMaClient for multi-confirmations
- Code clean-ups, removed unused classes, refactoring of old files
- SteamLib updated
- Localization and UI updates
- Dependcies updated to the last version

LegacyConverter:
 - Added mode to decrypt mafiles
2024-10-16 16:31:53 +03:00

41 lines
1.2 KiB
C#

using NebulaAuth.Model.Exceptions;
using NLog;
using SteamLib.Core;
using SteamLib.SteamMobile;
using System;
using Microsoft.Extensions.Logging;
using ILogger = Microsoft.Extensions.Logging.ILogger;
namespace NebulaAuth.Model;
public static class Shell
{
public static Logger Logger { get; } = LogManager.GetLogger("Logger");
public static ILogger ExtensionsLogger { get; private set; } = null!;
public static void Initialize()
{
var lp = new NLog.Extensions.Logging.NLogLoggerProvider();
var logger = lp.CreateLogger("SteamLib");
SteamLibErrorMonitor.MonitorLogger = logger;
AppDomain.CurrentDomain.UnhandledException += CurrentDomainOnUnhandledException;
var loggerFactory = new NLog.Extensions.Logging.NLogLoggerFactory();
ExtensionsLogger = loggerFactory.CreateLogger("Logger");
try
{
TimeAligner.AlignTime();
}
catch (Exception ex)
{
throw new CantAlignTimeException("", ex);
}
ExtensionsLogger.LogDebug("Application started");
}
private static void CurrentDomainOnUnhandledException(object sender, UnhandledExceptionEventArgs e)
{
Logger.Fatal((Exception)e.ExceptionObject);
}
}