Skip to content

Commit

Permalink
[console-logs] Expose LoggerProviderBuilder extension (#4583)
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeBlanch authored Jun 12, 2023
1 parent 3274c43 commit 09399d8
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 3 deletions.
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

0 comments on commit 09399d8

Please sign in to comment.