当前位置: 首页>>代码示例>>C#>>正文


C# Logger.Verbose方法代码示例

本文整理汇总了C#中Orleans.Runtime.Logger.Verbose方法的典型用法代码示例。如果您正苦于以下问题:C# Logger.Verbose方法的具体用法?C# Logger.Verbose怎么用?C# Logger.Verbose使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Orleans.Runtime.Logger的用法示例。


在下文中一共展示了Logger.Verbose方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Init

        private void Init(Func<object, Task> asynCallback, TimerCallback synCallback, object state, TimeSpan due, TimeSpan period)
        {
            if (synCallback == null && asynCallback == null) throw new ArgumentNullException("synCallback", "Cannot use null for both sync and asyncTask timer callbacks.");
            int numNonNulls = (asynCallback != null ? 1 : 0) + (synCallback != null ? 1 : 0);
            if (numNonNulls > 1) throw new ArgumentNullException("synCallback", "Cannot define more than one timer callbacks. Pick one.");
            if (period == TimeSpan.Zero) throw new ArgumentOutOfRangeException("period", period, "Cannot use TimeSpan.Zero for timer period");

            this.asynTaskCallback = asynCallback;
            syncCallbackFunc = synCallback;
            timerFrequency = period;
            this.dueTime = due;
            totalNumTicks = 0;

            logger = syncCallbackFunc != null ? syncLogger : asyncLogger;
            if (logger.IsVerbose) logger.Verbose(ErrorCode.TimerChanging, "Creating timer {0} with dueTime={1} period={2}", GetFullName(), due, period);

            timer = new Timer(HandleTimerCallback, state, Constants.INFINITE_TIMESPAN, Constants.INFINITE_TIMESPAN);
        }
开发者ID:Rejendo,项目名称:orleans,代码行数:18,代码来源:SafeTimerBase.cs

示例2: Log

 internal static void Log(Logger logger, string format, params object[] args)
 {
     logger.Verbose(format, args);
 }
开发者ID:gigya,项目名称:Orleans.KafkaStreamProvider,代码行数:4,代码来源:TimedQueueCache.cs

示例3: ProxiedMessageCenter

 public ProxiedMessageCenter(ClientConfiguration config, IPAddress localAddress, int gen, GrainId clientId, IGatewayListProvider gatewayListProvider)
 {
     lockable = new object();
     MyAddress = SiloAddress.New(new IPEndPoint(localAddress, 0), gen);
     ClientId = clientId;
     Running = false;
     MessagingConfiguration = config;
     GatewayManager = new GatewayManager(config, gatewayListProvider);
     PendingInboundMessages = new BlockingCollection<Message>();
     gatewayConnections = new Dictionary<Uri, GatewayConnection>();
     numMessages = 0;
     grainBuckets = new WeakReference[config.ClientSenderBuckets];
     logger = LogManager.GetLogger("Messaging.ProxiedMessageCenter", LoggerType.Runtime);
     if (logger.IsVerbose) logger.Verbose("Proxy grain client constructed");
     IntValueStatistic.FindOrCreate(StatisticNames.CLIENT_CONNECTED_GATEWAY_COUNT, () =>
         {
             lock (gatewayConnections)
             {
                 return gatewayConnections.Values.Count(conn => conn.IsLive);
             }
         });
     if (StatisticsCollector.CollectQueueStats)
     {
         queueTracking = new QueueTrackingStatistic("ClientReceiver");
     }
 }
开发者ID:Carlm-MS,项目名称:orleans,代码行数:26,代码来源:ProxiedMessageCenter.cs

示例4: Log

 internal static void Log(Logger logger, string format, params object[] args)
 {
     if (logger.IsVerbose) logger.Verbose(format, args);
     //if(logger.IsInfo) logger.Info(format, args);
 }
开发者ID:PaulNorth,项目名称:orleans,代码行数:5,代码来源:SimpleQueueCache.cs

示例5: LogStatus

 private static void LogStatus(Logger log, string msg, params object[] args)
 {
     if (SystemStatus.Current.Equals(SystemStatus.Creating))
     {
         // Reduce log noise during silo startup
         if (log.IsVerbose) log.Verbose(msg, args);
     }
     else
     {
         // Changes in agent threads during all operations aside for initial creation are usually important diag events.
         log.Info(msg, args);
     }
 }
开发者ID:osjimenez,项目名称:orleans,代码行数:13,代码来源:AsynchAgent.cs

示例6: AnalyzeReadException

        internal static bool AnalyzeReadException(Exception exc, int iteration, string tableName, Logger logger)
        {
            bool isLastErrorRetriable;
            var we = exc as WebException;
            if (we != null)
            {
                isLastErrorRetriable = true;
                var statusCode = we.Status;
                logger.Warn(ErrorCode.AzureTable_10,
                    $"Intermediate issue reading Azure storage table {tableName}: HTTP status code={statusCode} Exception Type={exc.GetType().FullName} Message='{exc.Message}'",
                    exc);
            }
            else
            {
                HttpStatusCode httpStatusCode;
                string restStatus;
                if (EvaluateException(exc, out httpStatusCode, out restStatus, true))
                {
                    if (StorageErrorCodeStrings.ResourceNotFound.Equals(restStatus))
                    {
                        if (logger.IsVerbose) logger.Verbose(ErrorCode.AzureTable_DataNotFound,
                            "DataNotFound reading Azure storage table {0}:{1} HTTP status code={2} REST status code={3} Exception={4}",
                            tableName,
                            iteration == 0 ? "" : (" Repeat=" + iteration),
                            httpStatusCode,
                            restStatus,
                            exc);

                        isLastErrorRetriable = false;
                    }
                    else
                    {
                        isLastErrorRetriable = IsRetriableHttpError(httpStatusCode, restStatus);

                        logger.Warn(ErrorCode.AzureTable_11,
                            $"Intermediate issue reading Azure storage table {tableName}:{(iteration == 0 ? "" : (" Repeat=" + iteration))} IsRetriable={isLastErrorRetriable} HTTP status code={httpStatusCode} REST status code={restStatus} Exception Type={exc.GetType().FullName} Message='{exc.Message}'",
                                exc);
                    }
                }
                else
                {
                    logger.Error(ErrorCode.AzureTable_12,
                        $"Unexpected issue reading Azure storage table {tableName}: Exception Type={exc.GetType().FullName} Message='{exc.Message}'",
                                 exc);
                    isLastErrorRetriable = false;
                }
            }
            return isLastErrorRetriable;
        }
开发者ID:Rejendo,项目名称:orleans,代码行数:49,代码来源:AzureStorageUtils.cs


注:本文中的Orleans.Runtime.Logger.Verbose方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。