Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • E emper
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 15
    • Issues 15
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 12
    • Merge requests 12
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • i4i4
  • manycore
  • emper
  • Merge requests
  • !32

make logging configurable during compilation and runtime

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Florian Fischer requested to merge configurable_log_level into master Nov 26, 2020
  • Overview 0
  • Commits 1
  • Pipelines 4
  • Changes 7

Compile-time:

  • A new meson option 'log_level' is introduced which has all the values from the Loglevel enum
  • The 'OFF' option defines EMPER_LOG_OFF which causes the LOG* macros to be empty and the Logger<>::log function to return immediately
  • The default 'automatic' option sets 'log_level' to 'Error' for release buand to 'ALL' otherwise

Runtime:

  • The global variable emper::log_level defined in Debug.hpp controls the logging output
  • It is initialized with the meson option 'log_level' but can be changed during runtime
Edited Nov 26, 2020 by Florian Fischer
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: configurable_log_level