Inject logger correctly into ActivityManager and ActivityRepository

pull/2765/head
Mark Monteiro 5 years ago
parent 573da63d41
commit 7b31b0e322

@ -18,11 +18,11 @@ namespace Emby.Server.Implementations.Activity
private readonly IUserManager _userManager;
public ActivityManager(
ILoggerFactory loggerFactory,
ILogger<ActivityManager> logger,
IActivityRepository repo,
IUserManager userManager)
{
_logger = loggerFactory.CreateLogger(nameof(ActivityManager));
_logger = logger;
_repo = repo;
_userManager = userManager;
}

@ -20,8 +20,8 @@ namespace Emby.Server.Implementations.Activity
private static readonly CultureInfo _usCulture = CultureInfo.ReadOnly(new CultureInfo("en-US"));
private readonly IFileSystem _fileSystem;
public ActivityRepository(ILoggerFactory loggerFactory, IServerApplicationPaths appPaths, IFileSystem fileSystem)
: base(loggerFactory.CreateLogger(nameof(ActivityRepository)))
public ActivityRepository(ILogger<ActivityRepository> logger, IServerApplicationPaths appPaths, IFileSystem fileSystem)
: base(logger)
{
DbFilePath = Path.Combine(appPaths.DataPath, "activitylog.db");
_fileSystem = fileSystem;

Loading…
Cancel
Save