Inject logger correctly into ActivityManager and ActivityRepository

This commit is contained in:
Mark Monteiro 2020-04-04 15:33:23 -04:00
parent 573da63d41
commit 7b31b0e322
3 changed files with 5 additions and 5 deletions

View File

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

View File

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