LogsSender is an abstraction to upload some logs on an ElasticSearch client.
Use LoggerFactory to create a logger.
LoggerFactory.Createtry to send log each time you use the logger.LoggerFactory.CreateBufferedstore log on device and wait to havebufferSizelog before send them.- You can use
LoggerFactory.CreateCustomto provide a customILogSender
You must specify a class which implements ILogBufferStorage to store logs. You can use InMemoryLogBufferStorage to store them in the memory.
For the default sender shipped in the package, if they fail to send log, there is a retry strategy which increase time between 2 retries. The maximum time between 2 retries is 50 seconds.
You can automaticaly add data to each log by adding an ILogAppender to the logger. By default there is a TimestampLogAppender added which send the UTC time of the log.