Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add support for remote log level to newlogd
As opposed to the default log level, which was setting which logs are produced by EVE's microservices, the remote log level will set which device logs are uploaded to the cloud. So it's assumed that the remote log level is always higher than the default log level. There are no changes in how newlogd collects the logs, only in how it handles the log files. For the logs that are uploaded: - we create a separate file with prefix dev.log.upload in collect - that file is gzipped when it reaches a certain size or by timer - the same as before - once gzipped the file is moved to devUpload - the same as before - once the file is uploaded successfully, it's deleted instead of being moved to keepSentQueue For the logs that stay on the device: - we create a separate file with prefix dev.log.keep in collect - that file is gzipped when it reaches a certain size - no timer - once gzipped the file is moved to keepSentQueue - the name of the folder is preserved The commit also contains some structural changes to the newlogd code: - init fileinfo inside trigMoveToGzip instead of passing it as parameter - add initNewLogfile function Signed-off-by: Paul Gaiduk <paulg@zededa.com>
- Loading branch information