mirror of
https://github.com/BepInEx/BepInEx.git
synced 2026-10-20 01:46:13 +00:00
2 files changed
+5
-1
No files matched your search
@@ -20,7 +20,7 @@ namespace BepInEx.Logging
|
||||
|
||||
public void Dispose() { }
|
||||
|
||||
private static readonly ConfigEntry<LogLevel> ConfigConsoleDisplayedLevel = ConfigFile.CoreConfig.Bind(
|
||||
public static readonly ConfigEntry<LogLevel> ConfigConsoleDisplayedLevel = ConfigFile.CoreConfig.Bind(
|
||||
"Logging.Console", "LogLevels",
|
||||
LogLevel.Fatal | LogLevel.Error | LogLevel.Message | LogLevel.Info,
|
||||
"Only displays the specified log levels in the console output.");
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using BepInEx.Configuration;
|
||||
using BepInEx.Logging;
|
||||
|
||||
namespace BepInEx.Preloader.Core.Logging
|
||||
@@ -29,6 +30,9 @@ namespace BepInEx.Preloader.Core.Logging
|
||||
|
||||
public void LogEvent(object sender, LogEventArgs eventArgs)
|
||||
{
|
||||
if ((eventArgs.Level & ConsoleLogListener.ConfigConsoleDisplayedLevel.Value) == 0)
|
||||
return;
|
||||
|
||||
LogEvents.Add(eventArgs);
|
||||
|
||||
ConsoleManager.SetConsoleColor(eventArgs.Level.GetConsoleColor());
|
||||
|
||||
Reference in new issue
Block a user