mirror of
https://github.com/BepInEx/BepInEx.git
synced 2026-10-20 01:46:13 +00:00
Apply code style
This commit is contained in:
1 parent
3e29e7b189
commit
ecb61f60d8
97 files changed
+8836
-8743
No files matched your search
@@ -5,46 +5,44 @@ using MonoMod.Utils;
|
||||
|
||||
namespace BepInEx.Preloader.Core.Logging
|
||||
{
|
||||
public static class ChainloaderLogHelper
|
||||
{
|
||||
public static void PrintLogInfo(ManualLogSource log)
|
||||
{
|
||||
string consoleTitle = $"BepInEx {Paths.BepInExVersion} - {Paths.ProcessName}";
|
||||
log.LogMessage(consoleTitle);
|
||||
public static class ChainloaderLogHelper
|
||||
{
|
||||
public static void PrintLogInfo(ManualLogSource log)
|
||||
{
|
||||
var consoleTitle = $"BepInEx {Paths.BepInExVersion} - {Paths.ProcessName}";
|
||||
log.LogMessage(consoleTitle);
|
||||
|
||||
if (ConsoleManager.ConsoleActive)
|
||||
ConsoleManager.SetConsoleTitle(consoleTitle);
|
||||
if (ConsoleManager.ConsoleActive)
|
||||
ConsoleManager.SetConsoleTitle(consoleTitle);
|
||||
|
||||
//See BuildInfoAttribute for more information about this section.
|
||||
object[] attributes = typeof(BuildInfoAttribute).Assembly.GetCustomAttributes(typeof(BuildInfoAttribute), false);
|
||||
//See BuildInfoAttribute for more information about this section.
|
||||
var attributes = typeof(BuildInfoAttribute).Assembly.GetCustomAttributes(typeof(BuildInfoAttribute), false);
|
||||
|
||||
if (attributes.Length > 0)
|
||||
{
|
||||
var attribute = (BuildInfoAttribute)attributes[0];
|
||||
log.LogMessage(attribute.Info);
|
||||
}
|
||||
if (attributes.Length > 0)
|
||||
{
|
||||
var attribute = (BuildInfoAttribute) attributes[0];
|
||||
log.LogMessage(attribute.Info);
|
||||
}
|
||||
|
||||
Logger.LogInfo($"System platform: {PlatformHelper.Current}");
|
||||
}
|
||||
Logger.LogInfo($"System platform: {PlatformHelper.Current}");
|
||||
}
|
||||
|
||||
public static void RewritePreloaderLogs()
|
||||
{
|
||||
if (PreloaderConsoleListener.LogEvents == null || PreloaderConsoleListener.LogEvents.Count == 0)
|
||||
return;
|
||||
public static void RewritePreloaderLogs()
|
||||
{
|
||||
if (PreloaderConsoleListener.LogEvents == null || PreloaderConsoleListener.LogEvents.Count == 0)
|
||||
return;
|
||||
|
||||
// Temporarily disable the console log listener as we replay the preloader logs
|
||||
var logListener = Logger.Listeners.FirstOrDefault(logger => logger is ConsoleLogListener);
|
||||
// Temporarily disable the console log listener as we replay the preloader logs
|
||||
var logListener = Logger.Listeners.FirstOrDefault(logger => logger is ConsoleLogListener);
|
||||
|
||||
if (logListener != null)
|
||||
Logger.Listeners.Remove(logListener);
|
||||
if (logListener != null)
|
||||
Logger.Listeners.Remove(logListener);
|
||||
|
||||
foreach (var preloaderLogEvent in PreloaderConsoleListener.LogEvents)
|
||||
{
|
||||
Logger.InternalLogEvent(PreloaderLogger.Log, preloaderLogEvent);
|
||||
}
|
||||
foreach (var preloaderLogEvent in PreloaderConsoleListener.LogEvents)
|
||||
Logger.InternalLogEvent(PreloaderLogger.Log, preloaderLogEvent);
|
||||
|
||||
if (logListener != null)
|
||||
Logger.Listeners.Add(logListener);
|
||||
}
|
||||
}
|
||||
if (logListener != null)
|
||||
Logger.Listeners.Add(logListener);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user