Skip to content

Commit

Permalink
add support for remote log level to newlogd
Browse files Browse the repository at this point in the history
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
europaul committed Nov 1, 2024
1 parent e031097 commit 3dc162b
Show file tree
Hide file tree
Showing 4 changed files with 157 additions and 129 deletions.
Loading

0 comments on commit 3dc162b

Please sign in to comment.