Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[console-logs] Expose LoggerProviderBuilder extension #4583

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
@@ -0,0 +1,3 @@
static OpenTelemetry.Logs.ConsoleExporterLoggingExtensions.AddConsoleExporter(this OpenTelemetry.Logs.LoggerProviderBuilder loggerProviderBuilder) -> OpenTelemetry.Logs.LoggerProviderBuilder
static OpenTelemetry.Logs.ConsoleExporterLoggingExtensions.AddConsoleExporter(this OpenTelemetry.Logs.LoggerProviderBuilder loggerProviderBuilder, string name, System.Action<OpenTelemetry.Exporter.ConsoleExporterOptions> configure) -> OpenTelemetry.Logs.LoggerProviderBuilder
static OpenTelemetry.Logs.ConsoleExporterLoggingExtensions.AddConsoleExporter(this OpenTelemetry.Logs.LoggerProviderBuilder loggerProviderBuilder, System.Action<OpenTelemetry.Exporter.ConsoleExporterOptions> configure) -> OpenTelemetry.Logs.LoggerProviderBuilder
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
static OpenTelemetry.Logs.ConsoleExporterLoggingExtensions.AddConsoleExporter(this OpenTelemetry.Logs.LoggerProviderBuilder loggerProviderBuilder) -> OpenTelemetry.Logs.LoggerProviderBuilder
static OpenTelemetry.Logs.ConsoleExporterLoggingExtensions.AddConsoleExporter(this OpenTelemetry.Logs.LoggerProviderBuilder loggerProviderBuilder, string name, System.Action<OpenTelemetry.Exporter.ConsoleExporterOptions> configure) -> OpenTelemetry.Logs.LoggerProviderBuilder
static OpenTelemetry.Logs.ConsoleExporterLoggingExtensions.AddConsoleExporter(this OpenTelemetry.Logs.LoggerProviderBuilder loggerProviderBuilder, System.Action<OpenTelemetry.Exporter.ConsoleExporterOptions> configure) -> OpenTelemetry.Logs.LoggerProviderBuilder
3 changes: 3 additions & 0 deletions src/OpenTelemetry.Exporter.Console/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
`ILogger.LogLevel` when exporting `LogRecord` instances.
([#4568](https://github.com/open-telemetry/opentelemetry-dotnet/pull/4568))

* Added `LoggerProviderBuilder.AddConsoleExporter` registration extension.
([#4583](https://github.com/open-telemetry/opentelemetry-dotnet/pull/4583))

## 1.5.0

Released 2023-Jun-05
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public static OpenTelemetryLoggerOptions AddConsoleExporter(this OpenTelemetryLo
/// </summary>
/// <param name="loggerProviderBuilder"><see cref="LoggerProviderBuilder"/>.</param>
/// <returns>The supplied instance of <see cref="LoggerProviderBuilder"/> to chain the calls.</returns>
internal static LoggerProviderBuilder AddConsoleExporter(
public static LoggerProviderBuilder AddConsoleExporter(
this LoggerProviderBuilder loggerProviderBuilder)
=> AddConsoleExporter(loggerProviderBuilder, name: null, configure: null);

Expand All @@ -63,7 +63,7 @@ internal static LoggerProviderBuilder AddConsoleExporter(
/// <param name="loggerProviderBuilder"><see cref="LoggerProviderBuilder"/>.</param>
/// <param name="configure">Callback action for configuring <see cref="ConsoleExporterOptions"/>.</param>
/// <returns>The supplied instance of <see cref="LoggerProviderBuilder"/> to chain the calls.</returns>
internal static LoggerProviderBuilder AddConsoleExporter(
public static LoggerProviderBuilder AddConsoleExporter(
this LoggerProviderBuilder loggerProviderBuilder,
Action<ConsoleExporterOptions> configure)
=> AddConsoleExporter(loggerProviderBuilder, name: null, configure);
Expand All @@ -75,7 +75,7 @@ internal static LoggerProviderBuilder AddConsoleExporter(
/// <param name="name">Name which is used when retrieving options.</param>
/// <param name="configure">Callback action for configuring <see cref="ConsoleExporterOptions"/>.</param>
/// <returns>The supplied instance of <see cref="LoggerProviderBuilder"/> to chain the calls.</returns>
internal static LoggerProviderBuilder AddConsoleExporter(
public static LoggerProviderBuilder AddConsoleExporter(
this LoggerProviderBuilder loggerProviderBuilder,
string name,
Action<ConsoleExporterOptions> configure)
Expand Down