Update getting started with logs (#3115)

This commit is contained in:
Cijo Thomas 2022-03-30 17:08:57 -07:00 committed by GitHub
parent e8ccab063b
commit ae4cbceaf1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 6 deletions

View File

@ -51,13 +51,15 @@ Congratulations! You are now collecting logs using OpenTelemetry.
What does the above program do?
The program uses the
The program creates a
[`LoggerFactory`](https://docs.microsoft.com/dotnet/api/microsoft.extensions.logging.iloggerfactory)
with OpenTelemetry added as a
[LoggerProvider](https://docs.microsoft.com/dotnet/core/extensions/logging-providers).
This `LoggerFactory` is used to create an
[`ILogger`](https://docs.microsoft.com/dotnet/api/microsoft.extensions.logging.ilogger)
API to log a formatted string with a severity level of Information. Click
[here](https://docs.microsoft.com/dotnet/api/microsoft.extensions.logging.loglevel)
for more information on the different logs levels. Opentelemetry captures this
and sends it to `ConsoleExporter`. `ConsoleExporter` simply displays it on the
console.
instance, which is then used to do the logging. The log is sent to the
`OpenTelemetryLoggerProvider`, which is configured to export logs to
`ConsoleExporter`. `ConsoleExporter` simply displays it on the console.
## Learn more