コード例 #1
0
        /// <summary>
        /// Initializes the log4net system using the <see cref="RollbarAppender"/>
        /// </summary>
        /// <param name="accessToken">the post_server_item key</param>
        /// <param name="configureAppender"></param>
        public static void Configure(string accessToken = null, Action <RollbarAppender> configureAppender = null)
        {
            var appender = new RollbarAppender {
                AccessToken = accessToken
            };

            configureAppender?.Invoke(appender);

            appender.ActivateOptions();

            BasicConfigurator.Configure(appender);
        }
コード例 #2
0
        /// <summary>
        /// Initializes the log4net system using the <see cref="RollbarAppender"/>
        /// </summary>
        /// <param name="accessToken">the post_server_item key</param>
        /// <param name="configureAppender"></param>
        public static void Configure(string accessToken = null, Action<RollbarAppender> configureAppender = null)
        {
            var appender = new RollbarAppender { AccessToken = accessToken };

            if (configureAppender != null)
            {
                configureAppender(appender);
            }

            appender.ActivateOptions();

            BasicConfigurator.Configure(appender);
        }