-
Notifications
You must be signed in to change notification settings - Fork 9
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
dynamic indexname #15
Comments
Have you tried %{logger} ? this feature should work. |
I tried and it ends creating an index named literally Il giorno gio 18 feb 2016 alle ore 19:13 Uriel Hai notifications@github.com
|
I'm sorry @MonDeveloper I couldn't reproduce this, My configuration is: <appender name="ElasticSearchAppender" type="log4net.ElasticSearch.ElasticSearchAppender, log4stash">
<Server>localhost</Server>
<Port>9200</Port>
<IndexName>index_%{logger}</IndexName>
<IndexType>LogEvent</IndexType>
<Bulksize>1</Bulksize>
<BulkIdleTimeout>-1</BulkIdleTimeout>
<IndexAsync>False</IndexAsync>
<FixedFields>Partial</FixedFields>
<ElasticFilters>
<Add>
<Key>logger</Key>
<Value>name</Value>
</Add>
</ElasticFilters>
</appender> And it successfully created index name |
This issue was moved to urielha/log4stash#5 |
I usually configure the IndexName with a fixed part (the ImndexName prefix) + the rolling date part.
It worked smoothly.
Now I need something more complex, I need to change the IndexName prefix from "the fixed part" to "a dynamic part" based on a message field like %logger for instance. I tried using both %logger and %{logger} but anytime it has been literally copied as part of the final IndexName and not evaluated.
The text was updated successfully, but these errors were encountered: