diff --git a/src/libraries/Microsoft.Extensions.Logging.Abstractions/gen/DiagnosticDescriptors.cs b/src/libraries/Microsoft.Extensions.Logging.Abstractions/gen/DiagnosticDescriptors.cs index 9e51646b52f17e..2e7e0ac340180d 100644 --- a/src/libraries/Microsoft.Extensions.Logging.Abstractions/gen/DiagnosticDescriptors.cs +++ b/src/libraries/Microsoft.Extensions.Logging.Abstractions/gen/DiagnosticDescriptors.cs @@ -66,7 +66,7 @@ public static class DiagnosticDescriptors public static DiagnosticDescriptor MissingLoggerArgument { get; } = new DiagnosticDescriptor( id: "SYSLIB1008", - title: new LocalizableResourceString(nameof(SR.MissingLoggerArgumentMessage), SR.ResourceManager, typeof(FxResources.Microsoft.Extensions.Logging.Generators.SR)), + title: new LocalizableResourceString(nameof(SR.MissingLoggerArgumentTitle), SR.ResourceManager, typeof(FxResources.Microsoft.Extensions.Logging.Generators.SR)), messageFormat: new LocalizableResourceString(nameof(SR.MissingLoggerArgumentMessage), SR.ResourceManager, typeof(FxResources.Microsoft.Extensions.Logging.Generators.SR)), category: "LoggingGenerator", DiagnosticSeverity.Error, diff --git a/src/libraries/Microsoft.Extensions.Logging.Abstractions/gen/LoggerMessageGenerator.Parser.cs b/src/libraries/Microsoft.Extensions.Logging.Abstractions/gen/LoggerMessageGenerator.Parser.cs index b7a7beea720edf..03c5ad2cf57624 100644 --- a/src/libraries/Microsoft.Extensions.Logging.Abstractions/gen/LoggerMessageGenerator.Parser.cs +++ b/src/libraries/Microsoft.Extensions.Logging.Abstractions/gen/LoggerMessageGenerator.Parser.cs @@ -273,7 +273,7 @@ public IReadOnlyList GetLogClasses(IEnumerable Logging methods must return void + + One of the arguments to a static logging method must implement the Microsoft.Extensions.Logging.ILogger interface + {Locked="Microsoft.Extensions.Logging.ILogger"} + - One of the arguments to a logging method must implement the Microsoft.Extensions.Logging.ILogger interface + One of the arguments to the static logging method '{0}' must implement the Microsoft.Extensions.Logging.ILogger interface {Locked="Microsoft.Extensions.Logging.ILogger"} @@ -167,7 +171,7 @@ Redundant qualifier in logging message - Argument {0} is not referenced from the logging message + Argument '{0}' is not referenced from the logging message Argument is not referenced from the logging message diff --git a/src/libraries/Microsoft.Extensions.Logging.Abstractions/gen/Resources/xlf/Strings.cs.xlf b/src/libraries/Microsoft.Extensions.Logging.Abstractions/gen/Resources/xlf/Strings.cs.xlf index 044e1bd67633f0..8a6e5be5b381c6 100644 --- a/src/libraries/Microsoft.Extensions.Logging.Abstractions/gen/Resources/xlf/Strings.cs.xlf +++ b/src/libraries/Microsoft.Extensions.Logging.Abstractions/gen/Resources/xlf/Strings.cs.xlf @@ -3,8 +3,8 @@ - Argument {0} is not referenced from the logging message - Argument {0} is not referenced from the logging message + Argument '{0}' is not referenced from the logging message + Argument '{0}' is not referenced from the logging message @@ -73,8 +73,13 @@ - One of the arguments to a logging method must implement the Microsoft.Extensions.Logging.ILogger interface - One of the arguments to a logging method must implement the Microsoft.Extensions.Logging.ILogger interface + One of the arguments to the static logging method '{0}' must implement the Microsoft.Extensions.Logging.ILogger interface + One of the arguments to the static logging method '{0}' must implement the Microsoft.Extensions.Logging.ILogger interface + {Locked="Microsoft.Extensions.Logging.ILogger"} + + + One of the arguments to a static logging method must implement the Microsoft.Extensions.Logging.ILogger interface + One of the arguments to a static logging method must implement the Microsoft.Extensions.Logging.ILogger interface {Locked="Microsoft.Extensions.Logging.ILogger"} diff --git a/src/libraries/Microsoft.Extensions.Logging.Abstractions/gen/Resources/xlf/Strings.de.xlf b/src/libraries/Microsoft.Extensions.Logging.Abstractions/gen/Resources/xlf/Strings.de.xlf index 258f697c492e26..835dfbbc7fbf1a 100644 --- a/src/libraries/Microsoft.Extensions.Logging.Abstractions/gen/Resources/xlf/Strings.de.xlf +++ b/src/libraries/Microsoft.Extensions.Logging.Abstractions/gen/Resources/xlf/Strings.de.xlf @@ -3,8 +3,8 @@ - Argument {0} is not referenced from the logging message - Argument {0} is not referenced from the logging message + Argument '{0}' is not referenced from the logging message + Argument '{0}' is not referenced from the logging message @@ -73,8 +73,13 @@ - One of the arguments to a logging method must implement the Microsoft.Extensions.Logging.ILogger interface - One of the arguments to a logging method must implement the Microsoft.Extensions.Logging.ILogger interface + One of the arguments to the static logging method '{0}' must implement the Microsoft.Extensions.Logging.ILogger interface + One of the arguments to the static logging method '{0}' must implement the Microsoft.Extensions.Logging.ILogger interface + {Locked="Microsoft.Extensions.Logging.ILogger"} + + + One of the arguments to a static logging method must implement the Microsoft.Extensions.Logging.ILogger interface + One of the arguments to a static logging method must implement the Microsoft.Extensions.Logging.ILogger interface {Locked="Microsoft.Extensions.Logging.ILogger"} diff --git a/src/libraries/Microsoft.Extensions.Logging.Abstractions/gen/Resources/xlf/Strings.es.xlf b/src/libraries/Microsoft.Extensions.Logging.Abstractions/gen/Resources/xlf/Strings.es.xlf index 0424989915dd77..0db7b4e17b3667 100644 --- a/src/libraries/Microsoft.Extensions.Logging.Abstractions/gen/Resources/xlf/Strings.es.xlf +++ b/src/libraries/Microsoft.Extensions.Logging.Abstractions/gen/Resources/xlf/Strings.es.xlf @@ -3,8 +3,8 @@ - Argument {0} is not referenced from the logging message - Argument {0} is not referenced from the logging message + Argument '{0}' is not referenced from the logging message + Argument '{0}' is not referenced from the logging message @@ -73,8 +73,13 @@ - One of the arguments to a logging method must implement the Microsoft.Extensions.Logging.ILogger interface - One of the arguments to a logging method must implement the Microsoft.Extensions.Logging.ILogger interface + One of the arguments to the static logging method '{0}' must implement the Microsoft.Extensions.Logging.ILogger interface + One of the arguments to the static logging method '{0}' must implement the Microsoft.Extensions.Logging.ILogger interface + {Locked="Microsoft.Extensions.Logging.ILogger"} + + + One of the arguments to a static logging method must implement the Microsoft.Extensions.Logging.ILogger interface + One of the arguments to a static logging method must implement the Microsoft.Extensions.Logging.ILogger interface {Locked="Microsoft.Extensions.Logging.ILogger"} diff --git a/src/libraries/Microsoft.Extensions.Logging.Abstractions/gen/Resources/xlf/Strings.fr.xlf b/src/libraries/Microsoft.Extensions.Logging.Abstractions/gen/Resources/xlf/Strings.fr.xlf index a482372783f57c..757ff655a6b142 100644 --- a/src/libraries/Microsoft.Extensions.Logging.Abstractions/gen/Resources/xlf/Strings.fr.xlf +++ b/src/libraries/Microsoft.Extensions.Logging.Abstractions/gen/Resources/xlf/Strings.fr.xlf @@ -3,8 +3,8 @@ - Argument {0} is not referenced from the logging message - Argument {0} is not referenced from the logging message + Argument '{0}' is not referenced from the logging message + Argument '{0}' is not referenced from the logging message @@ -73,8 +73,13 @@ - One of the arguments to a logging method must implement the Microsoft.Extensions.Logging.ILogger interface - One of the arguments to a logging method must implement the Microsoft.Extensions.Logging.ILogger interface + One of the arguments to the static logging method '{0}' must implement the Microsoft.Extensions.Logging.ILogger interface + One of the arguments to the static logging method '{0}' must implement the Microsoft.Extensions.Logging.ILogger interface + {Locked="Microsoft.Extensions.Logging.ILogger"} + + + One of the arguments to a static logging method must implement the Microsoft.Extensions.Logging.ILogger interface + One of the arguments to a static logging method must implement the Microsoft.Extensions.Logging.ILogger interface {Locked="Microsoft.Extensions.Logging.ILogger"} diff --git a/src/libraries/Microsoft.Extensions.Logging.Abstractions/gen/Resources/xlf/Strings.it.xlf b/src/libraries/Microsoft.Extensions.Logging.Abstractions/gen/Resources/xlf/Strings.it.xlf index 304056d1bd69fd..8717aa30c3c287 100644 --- a/src/libraries/Microsoft.Extensions.Logging.Abstractions/gen/Resources/xlf/Strings.it.xlf +++ b/src/libraries/Microsoft.Extensions.Logging.Abstractions/gen/Resources/xlf/Strings.it.xlf @@ -3,8 +3,8 @@ - Argument {0} is not referenced from the logging message - Argument {0} is not referenced from the logging message + Argument '{0}' is not referenced from the logging message + Argument '{0}' is not referenced from the logging message @@ -73,8 +73,13 @@ - One of the arguments to a logging method must implement the Microsoft.Extensions.Logging.ILogger interface - One of the arguments to a logging method must implement the Microsoft.Extensions.Logging.ILogger interface + One of the arguments to the static logging method '{0}' must implement the Microsoft.Extensions.Logging.ILogger interface + One of the arguments to the static logging method '{0}' must implement the Microsoft.Extensions.Logging.ILogger interface + {Locked="Microsoft.Extensions.Logging.ILogger"} + + + One of the arguments to a static logging method must implement the Microsoft.Extensions.Logging.ILogger interface + One of the arguments to a static logging method must implement the Microsoft.Extensions.Logging.ILogger interface {Locked="Microsoft.Extensions.Logging.ILogger"} diff --git a/src/libraries/Microsoft.Extensions.Logging.Abstractions/gen/Resources/xlf/Strings.ja.xlf b/src/libraries/Microsoft.Extensions.Logging.Abstractions/gen/Resources/xlf/Strings.ja.xlf index c8b172fd7630b6..9ed2e744c66a4c 100644 --- a/src/libraries/Microsoft.Extensions.Logging.Abstractions/gen/Resources/xlf/Strings.ja.xlf +++ b/src/libraries/Microsoft.Extensions.Logging.Abstractions/gen/Resources/xlf/Strings.ja.xlf @@ -3,8 +3,8 @@ - Argument {0} is not referenced from the logging message - Argument {0} is not referenced from the logging message + Argument '{0}' is not referenced from the logging message + Argument '{0}' is not referenced from the logging message @@ -73,8 +73,13 @@ - One of the arguments to a logging method must implement the Microsoft.Extensions.Logging.ILogger interface - One of the arguments to a logging method must implement the Microsoft.Extensions.Logging.ILogger interface + One of the arguments to the static logging method '{0}' must implement the Microsoft.Extensions.Logging.ILogger interface + One of the arguments to the static logging method '{0}' must implement the Microsoft.Extensions.Logging.ILogger interface + {Locked="Microsoft.Extensions.Logging.ILogger"} + + + One of the arguments to a static logging method must implement the Microsoft.Extensions.Logging.ILogger interface + One of the arguments to a static logging method must implement the Microsoft.Extensions.Logging.ILogger interface {Locked="Microsoft.Extensions.Logging.ILogger"} diff --git a/src/libraries/Microsoft.Extensions.Logging.Abstractions/gen/Resources/xlf/Strings.ko.xlf b/src/libraries/Microsoft.Extensions.Logging.Abstractions/gen/Resources/xlf/Strings.ko.xlf index fdb53576c829ad..5b7bbb9010784c 100644 --- a/src/libraries/Microsoft.Extensions.Logging.Abstractions/gen/Resources/xlf/Strings.ko.xlf +++ b/src/libraries/Microsoft.Extensions.Logging.Abstractions/gen/Resources/xlf/Strings.ko.xlf @@ -3,8 +3,8 @@ - Argument {0} is not referenced from the logging message - Argument {0} is not referenced from the logging message + Argument '{0}' is not referenced from the logging message + Argument '{0}' is not referenced from the logging message @@ -73,8 +73,13 @@ - One of the arguments to a logging method must implement the Microsoft.Extensions.Logging.ILogger interface - One of the arguments to a logging method must implement the Microsoft.Extensions.Logging.ILogger interface + One of the arguments to the static logging method '{0}' must implement the Microsoft.Extensions.Logging.ILogger interface + One of the arguments to the static logging method '{0}' must implement the Microsoft.Extensions.Logging.ILogger interface + {Locked="Microsoft.Extensions.Logging.ILogger"} + + + One of the arguments to a static logging method must implement the Microsoft.Extensions.Logging.ILogger interface + One of the arguments to a static logging method must implement the Microsoft.Extensions.Logging.ILogger interface {Locked="Microsoft.Extensions.Logging.ILogger"} diff --git a/src/libraries/Microsoft.Extensions.Logging.Abstractions/gen/Resources/xlf/Strings.pl.xlf b/src/libraries/Microsoft.Extensions.Logging.Abstractions/gen/Resources/xlf/Strings.pl.xlf index 790fec15f6a669..eed366ed41893d 100644 --- a/src/libraries/Microsoft.Extensions.Logging.Abstractions/gen/Resources/xlf/Strings.pl.xlf +++ b/src/libraries/Microsoft.Extensions.Logging.Abstractions/gen/Resources/xlf/Strings.pl.xlf @@ -3,8 +3,8 @@ - Argument {0} is not referenced from the logging message - Argument {0} is not referenced from the logging message + Argument '{0}' is not referenced from the logging message + Argument '{0}' is not referenced from the logging message @@ -73,8 +73,13 @@ - One of the arguments to a logging method must implement the Microsoft.Extensions.Logging.ILogger interface - One of the arguments to a logging method must implement the Microsoft.Extensions.Logging.ILogger interface + One of the arguments to the static logging method '{0}' must implement the Microsoft.Extensions.Logging.ILogger interface + One of the arguments to the static logging method '{0}' must implement the Microsoft.Extensions.Logging.ILogger interface + {Locked="Microsoft.Extensions.Logging.ILogger"} + + + One of the arguments to a static logging method must implement the Microsoft.Extensions.Logging.ILogger interface + One of the arguments to a static logging method must implement the Microsoft.Extensions.Logging.ILogger interface {Locked="Microsoft.Extensions.Logging.ILogger"} diff --git a/src/libraries/Microsoft.Extensions.Logging.Abstractions/gen/Resources/xlf/Strings.pt-BR.xlf b/src/libraries/Microsoft.Extensions.Logging.Abstractions/gen/Resources/xlf/Strings.pt-BR.xlf index 1451df01554bbe..c33ad19bb8cd91 100644 --- a/src/libraries/Microsoft.Extensions.Logging.Abstractions/gen/Resources/xlf/Strings.pt-BR.xlf +++ b/src/libraries/Microsoft.Extensions.Logging.Abstractions/gen/Resources/xlf/Strings.pt-BR.xlf @@ -3,8 +3,8 @@ - Argument {0} is not referenced from the logging message - Argument {0} is not referenced from the logging message + Argument '{0}' is not referenced from the logging message + Argument '{0}' is not referenced from the logging message @@ -73,8 +73,13 @@ - One of the arguments to a logging method must implement the Microsoft.Extensions.Logging.ILogger interface - One of the arguments to a logging method must implement the Microsoft.Extensions.Logging.ILogger interface + One of the arguments to the static logging method '{0}' must implement the Microsoft.Extensions.Logging.ILogger interface + One of the arguments to the static logging method '{0}' must implement the Microsoft.Extensions.Logging.ILogger interface + {Locked="Microsoft.Extensions.Logging.ILogger"} + + + One of the arguments to a static logging method must implement the Microsoft.Extensions.Logging.ILogger interface + One of the arguments to a static logging method must implement the Microsoft.Extensions.Logging.ILogger interface {Locked="Microsoft.Extensions.Logging.ILogger"} diff --git a/src/libraries/Microsoft.Extensions.Logging.Abstractions/gen/Resources/xlf/Strings.ru.xlf b/src/libraries/Microsoft.Extensions.Logging.Abstractions/gen/Resources/xlf/Strings.ru.xlf index 66fbc83a6e6a94..37548b1750a5cc 100644 --- a/src/libraries/Microsoft.Extensions.Logging.Abstractions/gen/Resources/xlf/Strings.ru.xlf +++ b/src/libraries/Microsoft.Extensions.Logging.Abstractions/gen/Resources/xlf/Strings.ru.xlf @@ -3,8 +3,8 @@ - Argument {0} is not referenced from the logging message - Argument {0} is not referenced from the logging message + Argument '{0}' is not referenced from the logging message + Argument '{0}' is not referenced from the logging message @@ -73,8 +73,13 @@ - One of the arguments to a logging method must implement the Microsoft.Extensions.Logging.ILogger interface - One of the arguments to a logging method must implement the Microsoft.Extensions.Logging.ILogger interface + One of the arguments to the static logging method '{0}' must implement the Microsoft.Extensions.Logging.ILogger interface + One of the arguments to the static logging method '{0}' must implement the Microsoft.Extensions.Logging.ILogger interface + {Locked="Microsoft.Extensions.Logging.ILogger"} + + + One of the arguments to a static logging method must implement the Microsoft.Extensions.Logging.ILogger interface + One of the arguments to a static logging method must implement the Microsoft.Extensions.Logging.ILogger interface {Locked="Microsoft.Extensions.Logging.ILogger"} diff --git a/src/libraries/Microsoft.Extensions.Logging.Abstractions/gen/Resources/xlf/Strings.tr.xlf b/src/libraries/Microsoft.Extensions.Logging.Abstractions/gen/Resources/xlf/Strings.tr.xlf index fc70ba858ab992..dccdbd55e57aa9 100644 --- a/src/libraries/Microsoft.Extensions.Logging.Abstractions/gen/Resources/xlf/Strings.tr.xlf +++ b/src/libraries/Microsoft.Extensions.Logging.Abstractions/gen/Resources/xlf/Strings.tr.xlf @@ -3,8 +3,8 @@ - Argument {0} is not referenced from the logging message - Argument {0} is not referenced from the logging message + Argument '{0}' is not referenced from the logging message + Argument '{0}' is not referenced from the logging message @@ -73,8 +73,13 @@ - One of the arguments to a logging method must implement the Microsoft.Extensions.Logging.ILogger interface - One of the arguments to a logging method must implement the Microsoft.Extensions.Logging.ILogger interface + One of the arguments to the static logging method '{0}' must implement the Microsoft.Extensions.Logging.ILogger interface + One of the arguments to the static logging method '{0}' must implement the Microsoft.Extensions.Logging.ILogger interface + {Locked="Microsoft.Extensions.Logging.ILogger"} + + + One of the arguments to a static logging method must implement the Microsoft.Extensions.Logging.ILogger interface + One of the arguments to a static logging method must implement the Microsoft.Extensions.Logging.ILogger interface {Locked="Microsoft.Extensions.Logging.ILogger"} diff --git a/src/libraries/Microsoft.Extensions.Logging.Abstractions/gen/Resources/xlf/Strings.zh-Hans.xlf b/src/libraries/Microsoft.Extensions.Logging.Abstractions/gen/Resources/xlf/Strings.zh-Hans.xlf index 2cdeaa1133a21c..98b2d4b7185e9b 100644 --- a/src/libraries/Microsoft.Extensions.Logging.Abstractions/gen/Resources/xlf/Strings.zh-Hans.xlf +++ b/src/libraries/Microsoft.Extensions.Logging.Abstractions/gen/Resources/xlf/Strings.zh-Hans.xlf @@ -3,8 +3,8 @@ - Argument {0} is not referenced from the logging message - Argument {0} is not referenced from the logging message + Argument '{0}' is not referenced from the logging message + Argument '{0}' is not referenced from the logging message @@ -73,8 +73,13 @@ - One of the arguments to a logging method must implement the Microsoft.Extensions.Logging.ILogger interface - One of the arguments to a logging method must implement the Microsoft.Extensions.Logging.ILogger interface + One of the arguments to the static logging method '{0}' must implement the Microsoft.Extensions.Logging.ILogger interface + One of the arguments to the static logging method '{0}' must implement the Microsoft.Extensions.Logging.ILogger interface + {Locked="Microsoft.Extensions.Logging.ILogger"} + + + One of the arguments to a static logging method must implement the Microsoft.Extensions.Logging.ILogger interface + One of the arguments to a static logging method must implement the Microsoft.Extensions.Logging.ILogger interface {Locked="Microsoft.Extensions.Logging.ILogger"} diff --git a/src/libraries/Microsoft.Extensions.Logging.Abstractions/gen/Resources/xlf/Strings.zh-Hant.xlf b/src/libraries/Microsoft.Extensions.Logging.Abstractions/gen/Resources/xlf/Strings.zh-Hant.xlf index 52f65573cda1e2..0a54ae2ca73273 100644 --- a/src/libraries/Microsoft.Extensions.Logging.Abstractions/gen/Resources/xlf/Strings.zh-Hant.xlf +++ b/src/libraries/Microsoft.Extensions.Logging.Abstractions/gen/Resources/xlf/Strings.zh-Hant.xlf @@ -3,8 +3,8 @@ - Argument {0} is not referenced from the logging message - Argument {0} is not referenced from the logging message + Argument '{0}' is not referenced from the logging message + Argument '{0}' is not referenced from the logging message @@ -73,8 +73,13 @@ - One of the arguments to a logging method must implement the Microsoft.Extensions.Logging.ILogger interface - One of the arguments to a logging method must implement the Microsoft.Extensions.Logging.ILogger interface + One of the arguments to the static logging method '{0}' must implement the Microsoft.Extensions.Logging.ILogger interface + One of the arguments to the static logging method '{0}' must implement the Microsoft.Extensions.Logging.ILogger interface + {Locked="Microsoft.Extensions.Logging.ILogger"} + + + One of the arguments to a static logging method must implement the Microsoft.Extensions.Logging.ILogger interface + One of the arguments to a static logging method must implement the Microsoft.Extensions.Logging.ILogger interface {Locked="Microsoft.Extensions.Logging.ILogger"} diff --git a/src/libraries/Microsoft.Extensions.Logging.Abstractions/tests/Microsoft.Extensions.Logging.Generators.Tests/LoggerMessageGeneratorParserTests.cs b/src/libraries/Microsoft.Extensions.Logging.Abstractions/tests/Microsoft.Extensions.Logging.Generators.Tests/LoggerMessageGeneratorParserTests.cs index f8942e11b6140b..e3e62f72b10cf7 100644 --- a/src/libraries/Microsoft.Extensions.Logging.Abstractions/tests/Microsoft.Extensions.Logging.Generators.Tests/LoggerMessageGeneratorParserTests.cs +++ b/src/libraries/Microsoft.Extensions.Logging.Abstractions/tests/Microsoft.Extensions.Logging.Generators.Tests/LoggerMessageGeneratorParserTests.cs @@ -77,6 +77,7 @@ partial class C Assert.Single(diagnostics); Assert.Equal(DiagnosticDescriptors.ArgumentHasNoCorrespondingTemplate.Id, diagnostics[0].Id); + Assert.Contains("Argument 'foo' is not referenced from the logging message", diagnostics[0].GetMessage(), StringComparison.InvariantCulture); } [Fact] @@ -395,6 +396,7 @@ partial class C Assert.Single(diagnostics); Assert.Equal(DiagnosticDescriptors.MissingLoggerArgument.Id, diagnostics[0].Id); + Assert.Contains("One of the arguments to the static logging method 'M1' must implement the Microsoft.Extensions.Logging.ILogger interface", diagnostics[0].GetMessage(), StringComparison.InvariantCulture); } [Fact]