Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
M
Monado
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 48
    • Issues 48
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 17
    • Merge Requests 17
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Monado
  • Monado
  • Merge Requests
  • !627

Merged
Created Dec 18, 2020 by Lubosz Sarnecki@luboszOwner

Port almost everything to u_logging.

  • Overview 2
  • Commits 32
  • Pipelines 7
  • Changes 74

This series of patches ports the complete code base to u_logging, consistently replacing printfs and deprecated logging macros.

The old logging macros did not check for valid state object in many cases. These calls needed to be adjusted to take a valid state and are now consistent.

Inconsistencies in compositor related log levels that were using old environment values were also resolved.

Improvements

  • All static logging now has a global state that can be set via XRT_LOG=debug etc.
  • I added little eye candy, having the log level strings aligned
  • Log level strings are now output in color on supported platforms (Linux).
  • Colors can be deactivated in the build by setting -DXRT_FEATURE_COLOR_LOG=0 in cmake or -Dcolor_log=false in meson.

What is left

Some drivers like V4L2, VIVE (Controller) and PSVR still use printf in debug code that concatinates strings by not printing new lines. In the case of the Vive controller it is disabled code guarded by a local define.

The oxr_logger was also left untouched as it uses custom logging and I did not bother understanding what is going on.

I leave the few leftover printfs are up to their original authors.

Available logging states with this patch set

Drivers:

ANDROID_SENSORS_LOG
ARDUINO_LOG
DAYDREAM_LOG
DUMMY_LOG
HDK_LOG
HT_LOG
HYDRA_LOG
NS_LOG
OHMD_LOG
PSMV_LOG
PSVR_LOG
SURVIVE_LOG
V4L2_LOG
VF_LOG
VIVE_LOG

Other:

AHARDWAREBUFFER_LOG
EGL_LOG
EGL_SWAPCHAIN_LOG
IPC_LOG
PROBER_LOG
PSVR_TRACKING_LOG
SIMPLE_IMU_LOG
XRT_COMPOSITOR_LOG
XRT_LOG
Assignee
Assign to
Reviewer
Request review from
None
Milestone
None
Assign milestone
Time tracking
Source branch: all-new-logging