Class ScopedRemoteApiSink
Represents a sink for emitting log events to a remote API.
public class ScopedRemoteApiSink : ILogEventSink
- Inheritance
-
ScopedRemoteApiSink
- Implements
-
ILogEventSink
- Inherited Members
Constructors
ScopedRemoteApiSink(LoggerConfig)
Create a scoped api sink
public ScopedRemoteApiSink(LoggerConfig loggerConfig)
Parameters
loggerConfigLoggerConfigThe logger configuration
Methods
Emit(LogEvent)
Store the log in the buffer to be sent to the remote API.
public void Emit(LogEvent logEvent)
Parameters
logEventLogEventThe log event to emit.
Flush(SimulatorsResource, CancellationToken)
Flushes the logs to the remote API and clears the buffer.
public Task Flush(SimulatorsResource client, CancellationToken token)
Parameters
clientSimulatorsResourceSimulator resource client
tokenCancellationTokenCancellation token
Returns
SetDefaultLogId(long)
Sets the default log ID.
public void SetDefaultLogId(long logId)
Parameters
logIdlongThe default log ID to set.