mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 18:27:23 +01:00
feat(SerilogEventSink): Add OnLogEvent event
This commit is contained in:
parent
0f78129bf1
commit
dc992e15ae
1 changed files with 6 additions and 0 deletions
|
|
@ -27,6 +27,11 @@ namespace Dalamud.Interface.Internal
|
|||
/// </summary>
|
||||
public event EventHandler<(string Line, LogEventLevel Level)> OnLogLine;
|
||||
|
||||
/// <summary>
|
||||
/// Event on a log line being emitted.
|
||||
/// </summary>
|
||||
public event EventHandler<LogEvent> OnLogEvent;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the default instance.
|
||||
/// </summary>
|
||||
|
|
@ -45,6 +50,7 @@ namespace Dalamud.Interface.Internal
|
|||
message += "\n" + logEvent.Exception;
|
||||
}
|
||||
|
||||
this.OnLogEvent?.Invoke(this, logEvent);
|
||||
this.OnLogLine?.Invoke(this, (message, logEvent.Level));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue