本文整理汇总了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)
{
}