Start using LoggerFactory

This commit is contained in:
Nikolaj
2020-09-15 12:40:35 +02:00
parent 9fa4319940
commit 0238d6eb02
22 changed files with 119 additions and 80 deletions

View File

@@ -7,9 +7,9 @@ namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0.DataTypes
{
public class PreValueMigratorCollection : BuilderCollectionBase<IPreValueMigrator>
{
private readonly ILogger _logger;
private readonly ILogger<PreValueMigratorCollection> _logger;
public PreValueMigratorCollection(IEnumerable<IPreValueMigrator> items, ILogger logger)
public PreValueMigratorCollection(IEnumerable<IPreValueMigrator> items, ILogger<PreValueMigratorCollection> logger)
: base(items)
{
_logger = logger;
@@ -19,7 +19,7 @@ namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0.DataTypes
public IPreValueMigrator GetMigrator(string editorAlias)
{
var migrator = this.FirstOrDefault(x => x.CanMigrate(editorAlias));
_logger.Debug("Getting migrator for \"{EditorAlias}\" = {MigratorType}", editorAlias, migrator == null ? "<null>" : migrator.GetType().Name);
_logger.LogDebug("Getting migrator for \"{EditorAlias}\" = {MigratorType}", editorAlias, migrator == null ? "<null>" : migrator.GetType().Name);
return migrator;
}
}