Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ public IReadOnlyList<LoggerClass> GetLogClasses(IEnumerable<ClassDeclarationSynt
{
if (isStatic && !foundLogger)
{
Diag(DiagnosticDescriptors.MissingLoggerArgument, method.GetLocation());
Diag(DiagnosticDescriptors.MissingLoggerArgument, method.GetLocation(), lm.Name);
keepMethod = false;
}
else if (!isStatic && foundLogger)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,12 @@
<data name="LoggingMethodMustReturnVoidMessage" xml:space="preserve">
<value>Logging methods must return void</value>
</data>
<data name="MissingLoggerArgumentTitle" xml:space="preserve">
<value>One of the arguments to a static logging method must implement the Microsoft.Extensions.Logging.ILogger interface</value>
<comment>{Locked="Microsoft.Extensions.Logging.ILogger"}</comment>
</data>
<data name="MissingLoggerArgumentMessage" xml:space="preserve">
<value>One of the arguments to a logging method must implement the Microsoft.Extensions.Logging.ILogger interface</value>
<value>One of the arguments to the static logging method '{0}' must implement the Microsoft.Extensions.Logging.ILogger interface</value>
<comment>{Locked="Microsoft.Extensions.Logging.ILogger"}</comment>
</data>
<data name="LoggingMethodShouldBeStaticMessage" xml:space="preserve">
Expand All @@ -167,7 +171,7 @@
<value>Redundant qualifier in logging message</value>
</data>
<data name="ArgumentHasNoCorrespondingTemplateMessage" xml:space="preserve">
<value>Argument {0} is not referenced from the logging message</value>
<value>Argument '{0}' is not referenced from the logging message</value>
</data>
<data name="ArgumentHasNoCorrespondingTemplateTitle" xml:space="preserve">
<value>Argument is not referenced from the logging message</value>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<file datatype="xml" source-language="en" target-language="cs" original="../Strings.resx">
<body>
<trans-unit id="ArgumentHasNoCorrespondingTemplateMessage">
<source>Argument {0} is not referenced from the logging message</source>
<target state="new">Argument {0} is not referenced from the logging message</target>
<source>Argument '{0}' is not referenced from the logging message</source>
<target state="new">Argument '{0}' is not referenced from the logging message</target>
<note />
</trans-unit>
<trans-unit id="ArgumentHasNoCorrespondingTemplateTitle">
Expand Down Expand Up @@ -73,8 +73,13 @@
<note />
</trans-unit>
<trans-unit id="MissingLoggerArgumentMessage">
<source>One of the arguments to a logging method must implement the Microsoft.Extensions.Logging.ILogger interface</source>
<target state="new">One of the arguments to a logging method must implement the Microsoft.Extensions.Logging.ILogger interface</target>
<source>One of the arguments to the static logging method '{0}' must implement the Microsoft.Extensions.Logging.ILogger interface</source>
<target state="new">One of the arguments to the static logging method '{0}' must implement the Microsoft.Extensions.Logging.ILogger interface</target>
<note>{Locked="Microsoft.Extensions.Logging.ILogger"}</note>
</trans-unit>
<trans-unit id="MissingLoggerArgumentTitle">
<source>One of the arguments to a static logging method must implement the Microsoft.Extensions.Logging.ILogger interface</source>
<target state="new">One of the arguments to a static logging method must implement the Microsoft.Extensions.Logging.ILogger interface</target>
<note>{Locked="Microsoft.Extensions.Logging.ILogger"}</note>
</trans-unit>
<trans-unit id="MissingLoggerFieldMessage">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<file datatype="xml" source-language="en" target-language="de" original="../Strings.resx">
<body>
<trans-unit id="ArgumentHasNoCorrespondingTemplateMessage">
<source>Argument {0} is not referenced from the logging message</source>
<target state="new">Argument {0} is not referenced from the logging message</target>
<source>Argument '{0}' is not referenced from the logging message</source>
<target state="new">Argument '{0}' is not referenced from the logging message</target>
<note />
</trans-unit>
<trans-unit id="ArgumentHasNoCorrespondingTemplateTitle">
Expand Down Expand Up @@ -73,8 +73,13 @@
<note />
</trans-unit>
<trans-unit id="MissingLoggerArgumentMessage">
<source>One of the arguments to a logging method must implement the Microsoft.Extensions.Logging.ILogger interface</source>
<target state="new">One of the arguments to a logging method must implement the Microsoft.Extensions.Logging.ILogger interface</target>
<source>One of the arguments to the static logging method '{0}' must implement the Microsoft.Extensions.Logging.ILogger interface</source>
<target state="new">One of the arguments to the static logging method '{0}' must implement the Microsoft.Extensions.Logging.ILogger interface</target>
<note>{Locked="Microsoft.Extensions.Logging.ILogger"}</note>
</trans-unit>
<trans-unit id="MissingLoggerArgumentTitle">
<source>One of the arguments to a static logging method must implement the Microsoft.Extensions.Logging.ILogger interface</source>
<target state="new">One of the arguments to a static logging method must implement the Microsoft.Extensions.Logging.ILogger interface</target>
<note>{Locked="Microsoft.Extensions.Logging.ILogger"}</note>
</trans-unit>
<trans-unit id="MissingLoggerFieldMessage">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<file datatype="xml" source-language="en" target-language="es" original="../Strings.resx">
<body>
<trans-unit id="ArgumentHasNoCorrespondingTemplateMessage">
<source>Argument {0} is not referenced from the logging message</source>
<target state="new">Argument {0} is not referenced from the logging message</target>
<source>Argument '{0}' is not referenced from the logging message</source>
<target state="new">Argument '{0}' is not referenced from the logging message</target>
<note />
</trans-unit>
<trans-unit id="ArgumentHasNoCorrespondingTemplateTitle">
Expand Down Expand Up @@ -73,8 +73,13 @@
<note />
</trans-unit>
<trans-unit id="MissingLoggerArgumentMessage">
<source>One of the arguments to a logging method must implement the Microsoft.Extensions.Logging.ILogger interface</source>
<target state="new">One of the arguments to a logging method must implement the Microsoft.Extensions.Logging.ILogger interface</target>
<source>One of the arguments to the static logging method '{0}' must implement the Microsoft.Extensions.Logging.ILogger interface</source>
<target state="new">One of the arguments to the static logging method '{0}' must implement the Microsoft.Extensions.Logging.ILogger interface</target>
<note>{Locked="Microsoft.Extensions.Logging.ILogger"}</note>
</trans-unit>
<trans-unit id="MissingLoggerArgumentTitle">
<source>One of the arguments to a static logging method must implement the Microsoft.Extensions.Logging.ILogger interface</source>
<target state="new">One of the arguments to a static logging method must implement the Microsoft.Extensions.Logging.ILogger interface</target>
<note>{Locked="Microsoft.Extensions.Logging.ILogger"}</note>
</trans-unit>
<trans-unit id="MissingLoggerFieldMessage">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<file datatype="xml" source-language="en" target-language="fr" original="../Strings.resx">
<body>
<trans-unit id="ArgumentHasNoCorrespondingTemplateMessage">
<source>Argument {0} is not referenced from the logging message</source>
<target state="new">Argument {0} is not referenced from the logging message</target>
<source>Argument '{0}' is not referenced from the logging message</source>
<target state="new">Argument '{0}' is not referenced from the logging message</target>
<note />
</trans-unit>
<trans-unit id="ArgumentHasNoCorrespondingTemplateTitle">
Expand Down Expand Up @@ -73,8 +73,13 @@
<note />
</trans-unit>
<trans-unit id="MissingLoggerArgumentMessage">
<source>One of the arguments to a logging method must implement the Microsoft.Extensions.Logging.ILogger interface</source>
<target state="new">One of the arguments to a logging method must implement the Microsoft.Extensions.Logging.ILogger interface</target>
<source>One of the arguments to the static logging method '{0}' must implement the Microsoft.Extensions.Logging.ILogger interface</source>
<target state="new">One of the arguments to the static logging method '{0}' must implement the Microsoft.Extensions.Logging.ILogger interface</target>
<note>{Locked="Microsoft.Extensions.Logging.ILogger"}</note>
</trans-unit>
<trans-unit id="MissingLoggerArgumentTitle">
<source>One of the arguments to a static logging method must implement the Microsoft.Extensions.Logging.ILogger interface</source>
<target state="new">One of the arguments to a static logging method must implement the Microsoft.Extensions.Logging.ILogger interface</target>
<note>{Locked="Microsoft.Extensions.Logging.ILogger"}</note>
</trans-unit>
<trans-unit id="MissingLoggerFieldMessage">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<file datatype="xml" source-language="en" target-language="it" original="../Strings.resx">
<body>
<trans-unit id="ArgumentHasNoCorrespondingTemplateMessage">
<source>Argument {0} is not referenced from the logging message</source>
<target state="new">Argument {0} is not referenced from the logging message</target>
<source>Argument '{0}' is not referenced from the logging message</source>
<target state="new">Argument '{0}' is not referenced from the logging message</target>
<note />
</trans-unit>
<trans-unit id="ArgumentHasNoCorrespondingTemplateTitle">
Expand Down Expand Up @@ -73,8 +73,13 @@
<note />
</trans-unit>
<trans-unit id="MissingLoggerArgumentMessage">
<source>One of the arguments to a logging method must implement the Microsoft.Extensions.Logging.ILogger interface</source>
<target state="new">One of the arguments to a logging method must implement the Microsoft.Extensions.Logging.ILogger interface</target>
<source>One of the arguments to the static logging method '{0}' must implement the Microsoft.Extensions.Logging.ILogger interface</source>
<target state="new">One of the arguments to the static logging method '{0}' must implement the Microsoft.Extensions.Logging.ILogger interface</target>
<note>{Locked="Microsoft.Extensions.Logging.ILogger"}</note>
</trans-unit>
<trans-unit id="MissingLoggerArgumentTitle">
<source>One of the arguments to a static logging method must implement the Microsoft.Extensions.Logging.ILogger interface</source>
<target state="new">One of the arguments to a static logging method must implement the Microsoft.Extensions.Logging.ILogger interface</target>
<note>{Locked="Microsoft.Extensions.Logging.ILogger"}</note>
</trans-unit>
<trans-unit id="MissingLoggerFieldMessage">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<file datatype="xml" source-language="en" target-language="ja" original="../Strings.resx">
<body>
<trans-unit id="ArgumentHasNoCorrespondingTemplateMessage">
<source>Argument {0} is not referenced from the logging message</source>
<target state="new">Argument {0} is not referenced from the logging message</target>
<source>Argument '{0}' is not referenced from the logging message</source>
<target state="new">Argument '{0}' is not referenced from the logging message</target>
<note />
</trans-unit>
<trans-unit id="ArgumentHasNoCorrespondingTemplateTitle">
Expand Down Expand Up @@ -73,8 +73,13 @@
<note />
</trans-unit>
<trans-unit id="MissingLoggerArgumentMessage">
<source>One of the arguments to a logging method must implement the Microsoft.Extensions.Logging.ILogger interface</source>
<target state="new">One of the arguments to a logging method must implement the Microsoft.Extensions.Logging.ILogger interface</target>
<source>One of the arguments to the static logging method '{0}' must implement the Microsoft.Extensions.Logging.ILogger interface</source>
<target state="new">One of the arguments to the static logging method '{0}' must implement the Microsoft.Extensions.Logging.ILogger interface</target>
<note>{Locked="Microsoft.Extensions.Logging.ILogger"}</note>
</trans-unit>
<trans-unit id="MissingLoggerArgumentTitle">
<source>One of the arguments to a static logging method must implement the Microsoft.Extensions.Logging.ILogger interface</source>
<target state="new">One of the arguments to a static logging method must implement the Microsoft.Extensions.Logging.ILogger interface</target>
<note>{Locked="Microsoft.Extensions.Logging.ILogger"}</note>
</trans-unit>
<trans-unit id="MissingLoggerFieldMessage">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<file datatype="xml" source-language="en" target-language="ko" original="../Strings.resx">
<body>
<trans-unit id="ArgumentHasNoCorrespondingTemplateMessage">
<source>Argument {0} is not referenced from the logging message</source>
<target state="new">Argument {0} is not referenced from the logging message</target>
<source>Argument '{0}' is not referenced from the logging message</source>
<target state="new">Argument '{0}' is not referenced from the logging message</target>
<note />
</trans-unit>
<trans-unit id="ArgumentHasNoCorrespondingTemplateTitle">
Expand Down Expand Up @@ -73,8 +73,13 @@
<note />
</trans-unit>
<trans-unit id="MissingLoggerArgumentMessage">
<source>One of the arguments to a logging method must implement the Microsoft.Extensions.Logging.ILogger interface</source>
<target state="new">One of the arguments to a logging method must implement the Microsoft.Extensions.Logging.ILogger interface</target>
<source>One of the arguments to the static logging method '{0}' must implement the Microsoft.Extensions.Logging.ILogger interface</source>
<target state="new">One of the arguments to the static logging method '{0}' must implement the Microsoft.Extensions.Logging.ILogger interface</target>
<note>{Locked="Microsoft.Extensions.Logging.ILogger"}</note>
</trans-unit>
<trans-unit id="MissingLoggerArgumentTitle">
<source>One of the arguments to a static logging method must implement the Microsoft.Extensions.Logging.ILogger interface</source>
<target state="new">One of the arguments to a static logging method must implement the Microsoft.Extensions.Logging.ILogger interface</target>
<note>{Locked="Microsoft.Extensions.Logging.ILogger"}</note>
</trans-unit>
<trans-unit id="MissingLoggerFieldMessage">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<file datatype="xml" source-language="en" target-language="pl" original="../Strings.resx">
<body>
<trans-unit id="ArgumentHasNoCorrespondingTemplateMessage">
<source>Argument {0} is not referenced from the logging message</source>
<target state="new">Argument {0} is not referenced from the logging message</target>
<source>Argument '{0}' is not referenced from the logging message</source>
<target state="new">Argument '{0}' is not referenced from the logging message</target>
<note />
</trans-unit>
<trans-unit id="ArgumentHasNoCorrespondingTemplateTitle">
Expand Down Expand Up @@ -73,8 +73,13 @@
<note />
</trans-unit>
<trans-unit id="MissingLoggerArgumentMessage">
<source>One of the arguments to a logging method must implement the Microsoft.Extensions.Logging.ILogger interface</source>
<target state="new">One of the arguments to a logging method must implement the Microsoft.Extensions.Logging.ILogger interface</target>
<source>One of the arguments to the static logging method '{0}' must implement the Microsoft.Extensions.Logging.ILogger interface</source>
<target state="new">One of the arguments to the static logging method '{0}' must implement the Microsoft.Extensions.Logging.ILogger interface</target>
<note>{Locked="Microsoft.Extensions.Logging.ILogger"}</note>
</trans-unit>
<trans-unit id="MissingLoggerArgumentTitle">
<source>One of the arguments to a static logging method must implement the Microsoft.Extensions.Logging.ILogger interface</source>
<target state="new">One of the arguments to a static logging method must implement the Microsoft.Extensions.Logging.ILogger interface</target>
<note>{Locked="Microsoft.Extensions.Logging.ILogger"}</note>
</trans-unit>
<trans-unit id="MissingLoggerFieldMessage">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<file datatype="xml" source-language="en" target-language="pt-BR" original="../Strings.resx">
<body>
<trans-unit id="ArgumentHasNoCorrespondingTemplateMessage">
<source>Argument {0} is not referenced from the logging message</source>
<target state="new">Argument {0} is not referenced from the logging message</target>
<source>Argument '{0}' is not referenced from the logging message</source>
<target state="new">Argument '{0}' is not referenced from the logging message</target>
<note />
</trans-unit>
<trans-unit id="ArgumentHasNoCorrespondingTemplateTitle">
Expand Down Expand Up @@ -73,8 +73,13 @@
<note />
</trans-unit>
<trans-unit id="MissingLoggerArgumentMessage">
<source>One of the arguments to a logging method must implement the Microsoft.Extensions.Logging.ILogger interface</source>
<target state="new">One of the arguments to a logging method must implement the Microsoft.Extensions.Logging.ILogger interface</target>
<source>One of the arguments to the static logging method '{0}' must implement the Microsoft.Extensions.Logging.ILogger interface</source>
<target state="new">One of the arguments to the static logging method '{0}' must implement the Microsoft.Extensions.Logging.ILogger interface</target>
<note>{Locked="Microsoft.Extensions.Logging.ILogger"}</note>
</trans-unit>
<trans-unit id="MissingLoggerArgumentTitle">
<source>One of the arguments to a static logging method must implement the Microsoft.Extensions.Logging.ILogger interface</source>
<target state="new">One of the arguments to a static logging method must implement the Microsoft.Extensions.Logging.ILogger interface</target>
<note>{Locked="Microsoft.Extensions.Logging.ILogger"}</note>
</trans-unit>
<trans-unit id="MissingLoggerFieldMessage">
Expand Down
Loading