1using System.Runtime.CompilerServices;
10 [DefaultImplementation(typeof(LogService))]
42 params KeyValuePair<string, object?>[] Tags);
51 [CallerFilePath]
string FilePath =
"",
52 [CallerLineNumber]
int LineNumber = 0);
60 params KeyValuePair<string, object?>[] Tags);
67 void LogWarning(
string Message, params KeyValuePair<string, object?>[] Tags);
80 void LogException(Exception ex, params KeyValuePair<string, object?>[] extraParameters);
87 void LogAlert(
string Message, params KeyValuePair<string, object?>[] Tags);
112 IList<KeyValuePair<string, object?>>
GetParameters(params KeyValuePair<string, object?>[] Tags);
Base class for event sinks.
A log implementation for logging warnings, exceptions and events.
void LogAlert(string Message, params KeyValuePair< string, object?>[] Tags)
Invoke this method to add an alert statement to the log.
void LogDebug(string Message, params KeyValuePair< string, object?>[] Tags)
Invoke this method to add a debug statement to the log.
void LogWarning(string Message, params KeyValuePair< string, object?>[] Tags)
Invoke this method to add a warning statement to the log.
string LoadExceptionDump()
Restores any exception dump that has previously been persisted with the SaveExceptionDump method.
void LogInformational(string Message, params KeyValuePair< string, object?>[] Tags)
Invoke this method to add an informational statement to the log.
void RemoveListener(IEventSink EventSink)
Removes an IEventSink to the log service.
void SaveExceptionDump(string Title, string StackTrace)
Saves an exception dump to disc, completely offline. A last resort operation.
Task StartDebugLogSessionAsync()
Starts a debug log session. This log all events to a file
void LogException(Exception ex)
Invoke this method to add an Exception entry to the log.
void LogDebug(string Message, [CallerFilePath] string FilePath="", [CallerLineNumber] int LineNumber=0)
Invoke this method to add a debug statement to the log.
IList< KeyValuePair< string, object?> > GetParameters(params KeyValuePair< string, object?>[] Tags)
Gets a list of extra parameters that are useful when logging: Platform, RuntimeVersion,...
void AddListener(IEventSink EventSink)
Adds an IEventSink to the log service. Any listeners will be called whenever any log event occurs.
Task EndDebugLogSessionAsync()
Ends a debug log session. This Stops all events from being logged to a file.
void DeleteExceptionDump()
Removes any exception dump from disc, if it exists.
void LogException(Exception ex, params KeyValuePair< string, object?>[] extraParameters)
Invoke this method to add an Exception entry to the log.
A service that can be loaded and unloaded at will. Typically during startup and shutdown of an applic...
Interface for all event sinks.