Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support remote log level #4413

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from

Commits on Nov 1, 2024

  1. correct log level setting in doc

    Put the correct name for the per-agent log level setting in the
    CONFIG-PROPERTIES.md file.
    
    Signed-off-by: Paul Gaiduk <paulg@zededa.com>
    europaul committed Nov 1, 2024
    Configuration menu
    Copy the full SHA
    e031097 View commit details
    Browse the repository at this point in the history
  2. 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>
    europaul committed Nov 1, 2024
    Configuration menu
    Copy the full SHA
    3dc162b View commit details
    Browse the repository at this point in the history
  3. new metrics for newlogd

    Add new metrics for newlogd:
    - LatestAvailableLog - the timestamp of the latest log available on the
        device
    - TotalSizeLogs - the total size of all logs on the device
    
    Signed-off-by: Paul Gaiduk <paulg@zededa.com>
    europaul committed Nov 1, 2024
    Configuration menu
    Copy the full SHA
    d9971b5 View commit details
    Browse the repository at this point in the history

Commits on Nov 6, 2024

  1. update LOGGING.md with chapter on log levels

    Add a chapter explaining how different log levels
    are handled in the system.
    
    Signed-off-by: Paul Gaiduk <paulg@zededa.com>
    europaul committed Nov 6, 2024
    Configuration menu
    Copy the full SHA
    c894bec View commit details
    Browse the repository at this point in the history