Skip to content
This repository has been archived by the owner on Jun 1, 2024. It is now read-only.

No LoggingLevelSwitch option in the extension method #138

Closed
1 of 2 tasks
piaste opened this issue Dec 20, 2017 · 1 comment
Closed
1 of 2 tasks

No LoggingLevelSwitch option in the extension method #138

piaste opened this issue Dec 20, 2017 · 1 comment

Comments

@piaste
Copy link
Contributor

piaste commented Dec 20, 2017

Does this issue relate to a new feature or an existing bug?

  • Bug
  • New Feature

Please describe the current behavior?

The LoggerSinkConfiguration.Elasticsearch() method allows you to specify a minimum logging level, but does not have an option to pass in a LoggingLevelSwitch object through which the minimum logging level can be changed at runtime.

Adding this object would allow a user to set a different log level for the ElasticSearch sink compared to any other sinks in use.

Note that the object can simply be passed immediately to the LoggerSinkConfiguration.Sink() method and does not require any actual implementation.

Please describe the expected behavior?

There should be a LoggingLevelSwitch property in the ElasticsearchSinkOptions class to enable use of this feature. Many Serilog sinks (including Console and File) have this option.

I will shortly submit a PR to add this property.

@piaste piaste mentioned this issue Dec 20, 2017
2 tasks
@mivano
Copy link
Contributor

mivano commented Jan 18, 2018

Merged and released.

@mivano mivano closed this as completed Jan 18, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants