I am currently sending my Log from Nlog to ElasticSearch. I am creating Index daily, and send Logs to that index. I want to create Index Weekly, so I want to change config file.
I do index creation in NLog configuration file.
index = "logstash-${date:format=yyyy.MM.dd}"
My NLog Configuration part :
<target xsi:type="ElasticSearch"
index = "logstash-${date:format=yyyy.MM.dd}"
uri="http://localhost:9200"
includeAllProperties ="true">
</target>
I found in some forums (https://github.com/logstash-plugins/logstash-output-elasticsearch/issues/541#issuecomment-270923437) changing weekly I should use like xxxx.ww.
I tried to change config file like this :
index = "logstash-${date:format=xxxx.ww}"
Unfortunately this is give me result logstash-xxxx.ww
, I expected result logstash-2019.25
So how can I change daily to weekly?