mirror of
https://github.com/achiez/NebulaAuth-Steam-Desktop-Authenticator-by-Achies.git
synced 2026-07-25 06:14:31 +00:00
1e65cd4a06
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
41 lines
1.2 KiB
C#
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);
|
|
}
|
|
} |