mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-01-02 13:53:40 +01:00
Re-add SourceContext property check
Technically an API breakage, some plugins are passing this for logging. Slated for removal in API 9, however.
This commit is contained in:
parent
764e0a81b7
commit
8911d4ebc2
1 changed files with 5 additions and 3 deletions
|
|
@ -504,14 +504,16 @@ internal class ConsoleWindow : Window, IDisposable
|
||||||
HasException = logEvent.Exception != null,
|
HasException = logEvent.Exception != null,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// TODO (v9): Remove SourceContext property check.
|
||||||
if (logEvent.Properties.ContainsKey("Dalamud.ModuleName"))
|
if (logEvent.Properties.ContainsKey("Dalamud.ModuleName"))
|
||||||
{
|
{
|
||||||
entry.Source = "DalamudInternal";
|
entry.Source = "DalamudInternal";
|
||||||
}
|
}
|
||||||
else if (logEvent.Properties.TryGetValue("Dalamud.PluginName", out var sourceProp) &&
|
else if ((logEvent.Properties.TryGetValue("Dalamud.PluginName", out var sourceProp) ||
|
||||||
sourceProp is ScalarValue { Value: string value })
|
logEvent.Properties.TryGetValue("SourceContext", out sourceProp)) &&
|
||||||
|
sourceProp is ScalarValue { Value: string sourceValue })
|
||||||
{
|
{
|
||||||
entry.Source = value;
|
entry.Source = sourceValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.logText.Add(entry);
|
this.logText.Add(entry);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue