|
@@ -10,7 +10,7 @@ namespace BepInEx.Logging
|
|
{
|
|
{
|
|
public void LogEvent(object sender, LogEventArgs eventArgs)
|
|
public void LogEvent(object sender, LogEventArgs eventArgs)
|
|
{
|
|
{
|
|
- if (eventArgs.Level.GetHighestLevel() > ConfigConsoleDisplayedLevel.Value)
|
|
|
|
|
|
+ if ((eventArgs.Level & ConfigConsoleDisplayedLevel.Value) > 0)
|
|
return;
|
|
return;
|
|
|
|
|
|
string log = $"[{eventArgs.Level,-7}:{((ILogSource)sender).SourceName,10}] {eventArgs.Data}\r\n";
|
|
string log = $"[{eventArgs.Level,-7}:{((ILogSource)sender).SourceName,10}] {eventArgs.Data}\r\n";
|
|
@@ -24,7 +24,7 @@ namespace BepInEx.Logging
|
|
|
|
|
|
private static readonly ConfigEntry<LogLevel> ConfigConsoleDisplayedLevel = ConfigFile.CoreConfig.Bind(
|
|
private static readonly ConfigEntry<LogLevel> ConfigConsoleDisplayedLevel = ConfigFile.CoreConfig.Bind(
|
|
"Logging.Console","DisplayedLogLevel",
|
|
"Logging.Console","DisplayedLogLevel",
|
|
- LogLevel.Info,
|
|
|
|
- "Only displays the specified log level and above in the console output.");
|
|
|
|
|
|
+ LogLevel.Fatal | LogLevel.Error | LogLevel.Message | LogLevel.Info,
|
|
|
|
+ "Only displays the specified log levels in the console output.");
|
|
}
|
|
}
|
|
}
|
|
}
|