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

Enable configuration of IndexDecider also from a config file #577

Open
kbalys opened this issue Feb 1, 2024 · 0 comments
Open

Enable configuration of IndexDecider also from a config file #577

kbalys opened this issue Feb 1, 2024 · 0 comments

Comments

@kbalys
Copy link

kbalys commented Feb 1, 2024

New feature request

Please describe the current behavior?

Currently IndexDecider setting can be set only from code.

public Func<LogEvent, DateTimeOffset, string> IndexDecider { get; set; }

I would like to have a possibility to set IndexDecider from configuration as well.

Please describe the expected behavior?
LoggerConfigurationElasticsearchExtensions.Elasticsearch should be changed to include IndexDecider as well which can be a string in class name, assembly format. Additionally, we would need an interface or base class which can be used for this setting with a single property which matches the definition of IndexDecider. The code in LoggerConfigurationElasticsearchExtensions.Elasticsearch can activate the class name provided by configuration and assign its property to the options.IndexDecider property

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

1 participant