Example #1
0
 /// <summary>
 /// Creates a new instance of <see cref="SentryTarget"/>.
 /// </summary>
 public SentryTarget(SentryNLogOptions options)
     : this(
         options,
         () => HubAdapter.Instance,
         sdkInstance : null,
         SystemClock.Clock)
 {
 }
Example #2
0
        internal SentryTarget(SentryNLogOptions options, Func <IHub> hubAccessor, IDisposable?sdkInstance, ISystemClock clock)
        {
            Options     = options;
            HubAccessor = hubAccessor;
            _clock      = clock;

            // Overrides default layout. Still will be explicitly overwritten if manually configured in the
            // NLog.config file.
            Layout                 = "${message}";
            BreadcrumbCategory     = Options.BreadcrumbCategoryLayout ?? "${logger}";
            IncludeEventProperties = true;

            if (sdkInstance != null)
            {
                _sdkDisposable = sdkInstance;
            }
        }
Example #3
0
        internal SentryTarget(SentryNLogOptions options, Func <IHub> hubAccessor, IDisposable sdkInstance, ISystemClock clock)
        {
            Debug.Assert(options != null);
            Debug.Assert(hubAccessor != null);
            Debug.Assert(clock != null);

            // Overrides default layout. Still will be explicitly overwritten if manually configured in the
            // NLog.config file.
            Layout = "${message}";

            Options      = options;
            _hubAccessor = hubAccessor;
            _clock       = clock;

            if (sdkInstance != null)
            {
                _sdkDisposable = sdkInstance;
            }
        }