eve icon indicating copy to clipboard operation
eve copied to clipboard

pkg/pillar: introduce syslog and kernel loglevels

Open rouming opened this issue 1 year ago • 2 comments

This PR introduces syslog and kernel log levels configuration parameters, which is defined in pkg/pillar. In the following PR the pkg/newlog will use new log levels pillar definitions. PR should be split in order to have correct build dependencies. Patches are the following:

  1. pkg/pillar: rename 'parseLevel' to 'parseLogrusLevel'

    Rename 'parseLevel' to 'parseLogrusLevel' emphasising that logging levels should be used as described in logrus library.

    In the next patch another parsing function will be introduced, which will have syslog/kernel log levels, that's why separation. Stay tuned.

  2. pkg/pillar: introduce 'debug.syslog.loglevel' and 'debug.kernel.loglevel'

    Introduce two configuration parameters:

    debug.syslog.loglevel - controls log level of the /dev/log, which is used system-wide for system user-space tools and daemons.

    debug.kernel.loglevel - controls log level of the /dev/kmsg, log messages added by kernel.

    Both settings use the log levels described in https://man7.org/linux/man-pages/man3/syslog.3.html, e.g.

    emerg, alert, crit, err, warning, notice, info, debug (sorted by reduced severity)

    The logrus log levels are also supported for the sake of compatibility.

  3. docs/CONFIG-PROPERTIES.md: describe 'debug.syslog.loglevel' and 'debug.kernel.loglevel'

    A few lines of syslog and kernel log level description.

  4. pkg/pillar: add syslog/kernel settings to the global_test

    Just a test extension.

rouming avatar Mar 12 '24 10:03 rouming

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 17.51%. Comparing base (7859da6) to head (da3ab38).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3807   +/-   ##
=======================================
  Coverage   17.51%   17.51%           
=======================================
  Files           3        3           
  Lines         805      805           
=======================================
  Hits          141      141           
  Misses        629      629           
  Partials       35       35           

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Mar 12 '24 10:03 codecov[bot]

The arm build fails even after re-running. Don't know why.

This is the most implicit and opaque build error the build system can raise. In my case locally I see the following:

 Error: error building "lfedge/eve-pillar:f6cd4c5f47f4900781840ea5b861ddecca52c35d": error building for arch arm64: failed to solve: no match for platform in manifest: not found

After certain amount of trials and errors I figured out that fscrypt should be also crossbuildable as pillar. I'm not 100% sure, but it seems I could fix the problem in this PR https://github.com/lf-edge/eve/pull/3824. Need confirmation from @deitch

rouming avatar Mar 19 '24 12:03 rouming

Rebased on latest master. Let's see how it builds on arm.

rouming avatar Apr 02 '24 09:04 rouming