Change the API ref for an ILogger in Logging topic (#7862)
parent
ef20ad81f5
commit
47c433a013
|
@ -28,7 +28,7 @@ For information on stdout logging when hosting with IIS, see <xref:host-and-depl
|
||||||
|
|
||||||
## How to create logs
|
## How to create logs
|
||||||
|
|
||||||
To create logs, implement an [ILogger](/dotnet/api/microsoft.extensions.logging.ilogger) object from the [dependency injection](xref:fundamentals/dependency-injection) container:
|
To create logs, implement an [ILogger<TCategoryName>](/dotnet/api/microsoft.extensions.logging.ilogger-1) object from the [dependency injection](xref:fundamentals/dependency-injection) container:
|
||||||
|
|
||||||
[!code-csharp[](index/sample/Controllers/TodoController.cs?name=snippet_LoggerDI&highlight=7)]
|
[!code-csharp[](index/sample/Controllers/TodoController.cs?name=snippet_LoggerDI&highlight=7)]
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue