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
loggerConfig
LoggerConfigThe logger configuration
Methods
Emit(LogEvent)
Store the log in the buffer to be sent to the remote API.
public void Emit(LogEvent logEvent)
Parameters
logEvent
LogEventThe 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
client
SimulatorsResourceSimulator resource client
token
CancellationTokenCancellation token
Returns
SetDefaultLogId(long)
Sets the default log ID.
public void SetDefaultLogId(long logId)
Parameters
logId
longThe default log ID to set.