0
viswajwalith created
- ABP Framework version: v5.3
- UI type: MVC
- DB provider: EF Core / MongoDB
- Tiered (MVC) or Identity Server Separated (Angular): yes
We are trying to save the Log file in a specific format "Log_YYY-MM-DD.txt" but not able to see any option with SerilogConfigurationHelper.Configure method
We tried by overriding the logic like below, with that we are getting the file name in the required format but not able to see data in Elastic search
Please advise.
3 Answer(s)
-
0
Are u call the
WriteTo.Elasticsearch
method?.WriteTo.Elasticsearch( new ElasticsearchSinkOptions(new Uri(configuration["ElasticSearch:Url"])) { AutoRegisterTemplate = true, AutoRegisterTemplateVersion = AutoRegisterTemplateVersion.ESv6, IndexFormat = "MyProjectName-log-{0:yyyy.MM}" })
-
0
Are u call the
WriteTo.Elasticsearch
method?.WriteTo.Elasticsearch( new ElasticsearchSinkOptions(new Uri(configuration["ElasticSearch:Url"])) { AutoRegisterTemplate = true, AutoRegisterTemplateVersion = AutoRegisterTemplateVersion.ESv6, IndexFormat = "MyProjectName-log-{0:yyyy.MM}" })
That means we need to add the custom code to write to elastic search right? But when using SerilogConfigurationHelper it it taking care automatically by the respective helper right?
-
0
Yes, You can copy the code from the
SerilogConfigurationHelper
.