Browse Source

Remove logging

pull/5973/head
Mladen Macanovic 5 years ago
parent
commit
4a3835fde9
  1. 14
      framework/src/Volo.Abp.BlazoriseUI/BlazoriseUiNotificationService.cs

14
framework/src/Volo.Abp.BlazoriseUI/BlazoriseUiNotificationService.cs

@ -2,8 +2,6 @@
using System.Threading.Tasks; using System.Threading.Tasks;
using Localization.Resources.AbpUi; using Localization.Resources.AbpUi;
using Microsoft.Extensions.Localization; using Microsoft.Extensions.Localization;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Logging.Abstractions;
using Volo.Abp.AspNetCore.Components.WebAssembly; using Volo.Abp.AspNetCore.Components.WebAssembly;
using Volo.Abp.DependencyInjection; using Volo.Abp.DependencyInjection;
@ -19,14 +17,10 @@ namespace Volo.Abp.BlazoriseUI
private readonly IStringLocalizer<AbpUiResource> localizer; private readonly IStringLocalizer<AbpUiResource> localizer;
public ILogger<BlazoriseUiNotificationService> Logger { get; set; }
public BlazoriseUiNotificationService( public BlazoriseUiNotificationService(
IStringLocalizer<AbpUiResource> localizer) IStringLocalizer<AbpUiResource> localizer)
{ {
this.localizer = localizer; this.localizer = localizer;
Logger = NullLogger<BlazoriseUiNotificationService>.Instance;
} }
public Task Info(string message, string title = null, Action<UiNotificationOptions> options = null) public Task Info(string message, string title = null, Action<UiNotificationOptions> options = null)
@ -34,8 +28,6 @@ namespace Volo.Abp.BlazoriseUI
var uiNotificationOptions = CreateDefaultOptions(); var uiNotificationOptions = CreateDefaultOptions();
options?.Invoke(uiNotificationOptions); options?.Invoke(uiNotificationOptions);
Logger.LogInformation(message);
NotificationReceived?.Invoke(this, new UiNotificationEventArgs(UiNotificationType.Info, message, title, uiNotificationOptions)); NotificationReceived?.Invoke(this, new UiNotificationEventArgs(UiNotificationType.Info, message, title, uiNotificationOptions));
return Task.CompletedTask; return Task.CompletedTask;
@ -46,8 +38,6 @@ namespace Volo.Abp.BlazoriseUI
var uiNotificationOptions = CreateDefaultOptions(); var uiNotificationOptions = CreateDefaultOptions();
options?.Invoke(uiNotificationOptions); options?.Invoke(uiNotificationOptions);
Logger.LogInformation(message);
NotificationReceived?.Invoke(this, new UiNotificationEventArgs(UiNotificationType.Success, message, title, uiNotificationOptions)); NotificationReceived?.Invoke(this, new UiNotificationEventArgs(UiNotificationType.Success, message, title, uiNotificationOptions));
return Task.CompletedTask; return Task.CompletedTask;
@ -58,8 +48,6 @@ namespace Volo.Abp.BlazoriseUI
var uiNotificationOptions = CreateDefaultOptions(); var uiNotificationOptions = CreateDefaultOptions();
options?.Invoke(uiNotificationOptions); options?.Invoke(uiNotificationOptions);
Logger.LogWarning(message);
NotificationReceived?.Invoke(this, new UiNotificationEventArgs(UiNotificationType.Warning, message, title, uiNotificationOptions)); NotificationReceived?.Invoke(this, new UiNotificationEventArgs(UiNotificationType.Warning, message, title, uiNotificationOptions));
return Task.CompletedTask; return Task.CompletedTask;
@ -70,8 +58,6 @@ namespace Volo.Abp.BlazoriseUI
var uiNotificationOptions = CreateDefaultOptions(); var uiNotificationOptions = CreateDefaultOptions();
options?.Invoke(uiNotificationOptions); options?.Invoke(uiNotificationOptions);
Logger.LogError(message);
NotificationReceived?.Invoke(this, new UiNotificationEventArgs(UiNotificationType.Error, message, title, uiNotificationOptions)); NotificationReceived?.Invoke(this, new UiNotificationEventArgs(UiNotificationType.Error, message, title, uiNotificationOptions));
return Task.CompletedTask; return Task.CompletedTask;

Loading…
Cancel
Save