WindowsAzureTableLog.CreateListener Method
Applies to: Semantic Logging 2.0
Creates an event listener that logs using a WindowsAzureTableSink.
Namespace: Microsoft.Practices.EnterpriseLibrary.SemanticLogging
Assembly: Microsoft.Practices.EnterpriseLibrary.SemanticLogging.WindowsAzure (in Microsoft.Practices.EnterpriseLibrary.SemanticLogging.WindowsAzure.dll) Version: 2.0.1406.1
Syntax
public static EventListener CreateListener(
string instanceName,
string connectionString,
string tableAddress = "SLABLogsTable",
Nullable<TimeSpan> bufferingInterval = null,
bool sortKeysAscending = false,
Nullable<TimeSpan> listenerDisposeTimeout = null,
int maxBufferSize = 30000
)
'Declaration
Public Shared Function CreateListener (
instanceName As String,
connectionString As String,
Optional tableAddress As String = "SLABLogsTable",
Optional bufferingInterval As Nullable(Of TimeSpan) = Nothing,
Optional sortKeysAscending As Boolean = false,
Optional listenerDisposeTimeout As Nullable(Of TimeSpan) = Nothing,
Optional maxBufferSize As Integer = 30000
) As EventListener
Parameters
- instanceName
Type: System.String
The name of the instance originating the entries.
- connectionString
Type: System.String
The connection string for the storage account.
- tableAddress (Optional)
Type: System.String
Either the name of the table, or the absolute URI to the table.
- bufferingInterval (Optional)
Type: System.Nullable<TimeSpan>
The buffering interval between each batch publishing.
- sortKeysAscending (Optional)
Type: System.Boolean
The value indicating whether to sort the row keys in ascending order.
- listenerDisposeTimeout (Optional)
Type: System.Nullable<TimeSpan>
Defines a timeout interval for the flush operation when the listener is disposed.
- maxBufferSize (Optional)
Type: System.Int32
The maximum number of entries that can be buffered while it's sending to Azure Storage before the sink starts dropping entries. This means that if the timeout period elapses, some event entries will be dropped and not sent to the store. Calling Dispose() on the EventListener will block until all the entries are flushed or the interval elapses. If nulla null reference (Nothing in Visual Basic) is specified, then the call will block indefinitely until the flush operation finishes.
Return Value
Type: EventListener
An event listener that uses WindowsAzureTableSink to log events.
See Also
Microsoft.Practices.EnterpriseLibrary.SemanticLogging Namespace