Beispiel #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="RollbarAppender"/> class.
        /// </summary>
        /// <param name="rollbarConfig">The Rollbar configuration.</param>
        /// <param name="rollbarBlockingLoggingTimeout">The Rollbar blocking logging timeout.</param>
        public RollbarAppender(
            IRollbarConfig rollbarConfig,
            TimeSpan?rollbarBlockingLoggingTimeout
            )
        {
            this._rollbarConfig = rollbarConfig;

            RollbarFactory.CreateProper(
                this._rollbarConfig,
                rollbarBlockingLoggingTimeout,
                out this._rollbarAsyncLogger,
                out this._rollbarLogger
                );
        }
Beispiel #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="RollbarAppender"/> class.
        /// </summary>
        public RollbarAppender()
        {
            RollbarConfig rollbarConfig = new RollbarConfig("just_a_seed_value");

#if NETSTANDARD
            Rollbar.NetCore.AppSettingsUtil.LoadAppSettings(ref rollbarConfig);
#endif
            this._rollbarConfig = rollbarConfig;
            RollbarFactory.CreateProper(
                this._rollbarConfig,
                TimeSpan.FromSeconds(rollbarTimeoutSeconds),
                out this._rollbarAsyncLogger,
                out this._rollbarLogger
                );
        }