本文整理匯總了C#中Orleans.Runtime.Logger類的典型用法代碼示例。如果您正苦於以下問題:C# Logger類的具體用法?C# Logger怎麽用?C# Logger使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
Logger類屬於Orleans.Runtime命名空間,在下文中一共展示了Logger類的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: StreamProviderManagerAgent
public StreamProviderManagerAgent(Silo silo, List<IProvider> allSiloProviders, IStreamProviderRuntime streamProviderRuntime)
: base(Constants.StreamProviderManagerAgentSystemTargetId, silo.SiloAddress)
{
logger = LogManager.GetLogger("StreamProviderUpdateAgent", LoggerType.Runtime);
this.streamProviderManager = (StreamProviderManager)silo.StreamProviderManager;
providerConfigurations = silo.GlobalConfig.ProviderConfigurations;
this.allSiloProviders = allSiloProviders;
this.streamProviderRuntime = streamProviderRuntime;
nonReentrancyGuarantor = new AsyncSerialExecutor();
}
示例2: DeleteAllUsedAzureQueues
/// <summary>
/// Helper method for testing.
/// </summary>
/// <param name="providerName"></param>
/// <param name="deploymentId"></param>
/// <param name="storageConnectionString"></param>
/// <param name="logger"></param>
/// <returns></returns>
public static async Task DeleteAllUsedAzureQueues(string providerName, string deploymentId, string storageConnectionString, Logger logger)
{
if (deploymentId != null)
{
var queueMapper = new HashRingBasedStreamQueueMapper(AzureQueueAdapterFactory.DEFAULT_NUM_QUEUES, providerName);
List<QueueId> allQueues = queueMapper.GetAllQueues().ToList();
if (logger != null) logger.Info("About to delete all {0} Stream Queues\n", allQueues.Count);
foreach (var queueId in allQueues)
{
var manager = new AzureQueueDataManager(queueId.ToString(), deploymentId, storageConnectionString);
await manager.DeleteQueue();
}
}
}
示例3: OnActivateAsync
public override async Task OnActivateAsync()
{
logger = base.GetLogger("GeneratedEvenCollectorGrain " + base.IdentityString);
logger.Info("OnActivateAsync");
var streamProvider = GetStreamProvider(GeneratedStreamTestConstants.StreamProviderName);
stream = streamProvider.GetStream<GeneratedEvent>(this.GetPrimaryKey(), StreamNamespace);
await stream.SubscribeAsync(
(e, t) =>
{
counter++;
logger.Info("Received a generated event {0}, of {1} events", e, counter);
if (e.EventType == GeneratedEvent.GeneratedEventType.Fill)
{
return TaskDone.Done;
}
var reporter = this.GrainFactory.GetGrain<IGeneratedEventReporterGrain>(GeneratedStreamTestConstants.ReporterId);
return reporter.ReportResult(this.GetPrimaryKey(), GeneratedStreamTestConstants.StreamProviderName, StreamNamespace, counter);
});
}
示例4: CreateGatewayListProvider
protected override IGatewayListProvider CreateGatewayListProvider(Logger logger)
{
return AssemblyLoader.LoadAndCreateInstance<IGatewayListProvider>(Constants.ORLEANS_ZOOKEEPER_UTILS_DLL, logger);
}
示例5: CreateMembershipTable
protected override IMembershipTable CreateMembershipTable(Logger logger)
{
return AssemblyLoader.LoadAndCreateInstance<IMembershipTable>(Constants.ORLEANS_ZOOKEEPER_UTILS_DLL, logger);
}
示例6: CreateGatewayListProvider
protected override IGatewayListProvider CreateGatewayListProvider(Logger logger)
{
return new SqlMembershipTable();
}
示例7: CreateMembershipTable
protected override IMembershipTable CreateMembershipTable(Logger logger)
{
return new SqlMembershipTable();
}
示例8: OnActivateAsync
public override Task OnActivateAsync()
{
this.logger = GetLogger();
return base.OnActivateAsync();
}
示例9: TrackMetric
public void TrackMetric(Logger logger)
{
}