mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 10:17:22 +01:00
feat: add log level to log window
This commit is contained in:
parent
b418a6dc0f
commit
8102ae6422
2 changed files with 6 additions and 3 deletions
|
|
@ -58,7 +58,6 @@ namespace Dalamud.Interface
|
|||
var clear = ImGui.Button("Clear");
|
||||
ImGui.SameLine();
|
||||
var copy = ImGui.Button("Copy");
|
||||
ImGui.SameLine();
|
||||
|
||||
ImGui.BeginChild("scrolling", new Vector2(0, 0), false, ImGuiWindowFlags.HorizontalScrollbar);
|
||||
|
||||
|
|
|
|||
|
|
@ -27,8 +27,12 @@ namespace Dalamud.Interface
|
|||
|
||||
public void Emit(LogEvent logEvent)
|
||||
{
|
||||
var message = logEvent.RenderMessage(_formatProvider);
|
||||
OnLogLine?.Invoke(this, $"[{DateTimeOffset.Now.ToString()}][{logEvent.Level}] {message}");
|
||||
var message = $"[{DateTimeOffset.Now.ToString()}][{logEvent.Level}] {logEvent.RenderMessage(_formatProvider)}";
|
||||
|
||||
if (logEvent.Exception != null)
|
||||
message += "\n" + logEvent.Exception;
|
||||
|
||||
OnLogLine?.Invoke(this, message);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue