Skip to content

Disable periodic debug logs by default#2

Merged
matias-pavez-dx merged 2 commits intomasterfrom
feature/silence-debug-logs-CU-860t4qqd8
Jan 16, 2024
Merged

Disable periodic debug logs by default#2
matias-pavez-dx merged 2 commits intomasterfrom
feature/silence-debug-logs-CU-860t4qqd8

Conversation

@matias-pavez-dx
Copy link
Copy Markdown

@matias-pavez-dx matias-pavez-dx commented Jan 9, 2024

Description

Add configuration to enable or disable the logs on runtime.

If enabled, it will display logs like:

1705313514.3751209 [node-name] [CSF][do_filtering] [0] Configuring terrain...
1705313514.3755646 [node-name] [CSF][do_filtering] [0] Configuring cloth with (w,h)=(58,75) ...
1705313514.3870096 [node-name] [CSF][do_filtering] [0] Rasterizing...
1705313514.3887200 [node-name] [CSF][do_filtering] [0] Simulating...
1705313514.3996294 [node-name] [CSF][do_filtering] [0] Post handle...

Motivation and Context

These logs are displayed for every perception spin (e.g. 10Hz), making all other logs unreadable.

Example of original logs for every spin:

1704824061.2610149 [node-name] [0] Configuring terrain...
1704824061.2619231 [node-name] [0] Configuring cloth...
1704824061.2621562 [node-name] [0]  - width: 58 height: 76
1704824061.2780621 [node-name] [0] Rasterizing...
1704824061.2797780 [node-name] [0] Simulating...
1704824061.2888267 [node-name] [0]  - post handle...

How Has This Been Tested?

  • Built CSF locally with is_logging_enabled as false and true, then checked it by running the perception pipeline.
  • Integrate the feature in the perception pipeline.
cd /home/docker/base/CSF/
mkdir -p build && cd build
cmake -DBUILD_SHARED_LIBS=ON ..
make -j$(nproc)
make install -j$(nproc)
make clean

These logs are displayed at for every perception spin, making all other logs unreadable.
@matias-pavez-dx matias-pavez-dx added refactor Improves code quality review and merge Ask the reviewer to expedite merging labels Jan 9, 2024
@matias-pavez-dx matias-pavez-dx requested a review from a team January 9, 2024 18:44
@matias-pavez-dx matias-pavez-dx self-assigned this Jan 9, 2024
@detrabot
Copy link
Copy Markdown

detrabot commented Jan 9, 2024

Task linked: CU-860t4qqd8 Oji Integration Part II

@matias-pavez-dx matias-pavez-dx changed the title Silence debug logs Silence periodic debug logs Jan 9, 2024
Comment thread src/CSF.cpp Outdated
@matias-pavez-dx matias-pavez-dx changed the title Silence periodic debug logs Disable periodic debug logs by default Jan 15, 2024
Copy link
Copy Markdown

@bexultandeepx bexultandeepx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@matias-pavez-dx matias-pavez-dx merged commit 3a175a9 into master Jan 16, 2024
@matias-pavez-dx matias-pavez-dx deleted the feature/silence-debug-logs-CU-860t4qqd8 branch January 16, 2024 02:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactor Improves code quality review and merge Ask the reviewer to expedite merging

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants