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

Removed logs from the configuration manager getter methods. #4495

Merged
merged 2 commits into from
Jan 27, 2021

Conversation

kkasperczyk-no
Copy link
Contributor

Problem

Getter methods of the Configuration Manager contain logs, what results in printing the same logs multiple times on the console.

Summary of Changes

  • Removed logs from Configuration Manager getter methods
  • Added printing information about setup pin code and setup discriminator to the LogDeviceConfig() method
  • Removed if CHIP_PROGRESS_LOGGING condition before LogDeviceConfig() implementation, as it should be checked before calling it (and is already used there)
  • Created interface to the LogDeviceConfig() to allow using it in samples
  • Removed returning setupPinCode from the QRCodeUtil::GetQRCode() method.
  • Removed printing setup pin code from the PrintQRCode method().
  • Aligned nrfconnect, EFR32 and QPG6100 samples, because of the QRCodeUtil API changes.

Getter methods of the Configuration Manager contain logs, what results
in printing the same logs multiple times on the console.

* Removed logs from Configuration Manager getter methods
* Added printing information about setup pin code and setup discriminator
to the LogDeviceConfig() method
* Removed if CHIP_PROGRESS_LOGGING condition before LogDeviceConfig()
implementation, as it should be checked before calling it (and is already
used there)
* Created interface to the LogDeviceConfig() to allow using it in samples
* Removed returning setupPinCode from the QRCodeUtil::GetQRCode() method.
* Removed printing setup pin code from the PrintQRCode method().
* Aligned nrfconnect, EFR32 and QPG6100 samples, because of
the QRCodeUtil API changes.
@kkasperczyk-no
Copy link
Contributor Author

kkasperczyk-no commented Jan 26, 2021

This PR is changing QRCodeUtil API a little bit, so I wanted to align all samples, which could be affected by this change. Could some of you @jmartinez-silabs @jepenven-silabs @tima-q review EFR32 and QPG6100 samples changes to make sure that any regressions will not appear?

@github-actions
Copy link

Size increase report for "esp32-example-build" from 5dcbd40

File Section File VM
chip-all-clusters-app.elf .flash.text -28 -28
chip-all-clusters-app.elf .flash.rodata -96 -96
Full report output
BLOAT REPORT

Files found only in the build output:
    report.csv

Comparing ./master_artifact/chip-all-clusters-app.elf and ./pull_artifact/chip-all-clusters-app.elf:

sections,vmsize,filesize
[Unmapped],0,96
.debug_str,0,63
.xt.prop._ZTVN4chip11DeviceLayer37DeviceNetworkProvisioningDelegateImplE,0,2
.flash.text,-28,-28
.debug_abbrev,0,-34
.debug_line,0,-53
.debug_info,0,-55
.flash.rodata,-96,-96
.debug_loc,0,-115


@github-actions
Copy link

Size increase report for "nrfconnect-example-build" from 5dcbd40

File Section File VM
chip-lock.elf text 468 468
chip-lock.elf rodata 216 220
chip-lock.elf shell_root_cmds_sections -4 -4
chip-lighting.elf text 468 468
chip-lighting.elf rodata 224 220
chip-lighting.elf shell_root_cmds_sections -4 -4
chip-shell.elf log_const_sections -4 -4
chip-shell.elf text -28 -28
chip-shell.elf rodata -88 -88
Full report output
BLOAT REPORT

Files found only in the build output:
    report.csv

Comparing ./master_artifact/chip-lock.elf and ./pull_artifact/chip-lock.elf:

sections,vmsize,filesize
.strtab,0,777
text,468,468
.symtab,0,320
.debug_info,0,250
rodata,220,216
.debug_str,0,63
.shstrtab,0,3
.debug_frame,0,-4
shell_root_cmds_sections,-4,-4
.debug_line,0,-22
.debug_ranges,0,-72
.debug_loc,0,-111

Comparing ./master_artifact/chip-lighting.elf and ./pull_artifact/chip-lighting.elf:

sections,vmsize,filesize
.strtab,0,777
text,468,468
.symtab,0,320
.debug_info,0,251
rodata,220,224
.debug_str,0,63
.shstrtab,0,3
.debug_frame,0,-4
shell_root_cmds_sections,-4,-4
.debug_line,0,-23
.debug_ranges,0,-72
.debug_loc,0,-111

Comparing ./master_artifact/chip-shell.elf and ./pull_artifact/chip-shell.elf:

sections,vmsize,filesize
.debug_info,0,223
.debug_str,0,78
.debug_line,0,17
log_const_sections,-4,-4
.debug_loc,0,-14
text,-28,-28
.symtab,0,-32
rodata,-88,-88


@tima-q
Copy link
Contributor

tima-q commented Jan 26, 2021

This PR is changing QRCodeUtil API a little bit, so I wanted to align all samples, which could be affected by this change. Could some of you @jmartinez-silabs @jepenven-silabs @tima-q review EFR32 and QPG6100 samples changes to make sure that any regressions will not appear?

@kkasperczyk-no looks fine after compiling in your changes. Grouping the info makes it more readable as well. Thanks!

@jepenven-silabs
Copy link
Contributor

This PR is changing QRCodeUtil API a little bit, so I wanted to align all samples, which could be affected by this change. Could some of you @jmartinez-silabs @jepenven-silabs @tima-q review EFR32 and QPG6100 samples changes to make sure that any regressions will not appear?

Everything seems fine on our side as well

@pullapprove pullapprove bot requested a review from woody-apple January 27, 2021 04:50
@woody-apple
Copy link
Contributor

@andy31415 @jelderton ?

@andy31415 andy31415 merged commit 1f3e4ed into project-chip:master Jan 27, 2021
austinh0 pushed a commit to austinh0/connectedhomeip that referenced this pull request Jan 28, 2021
…chip#4495)

* Removed logs from the configuration manager getter methods.

Getter methods of the Configuration Manager contain logs, what results
in printing the same logs multiple times on the console.

* Removed logs from Configuration Manager getter methods
* Added printing information about setup pin code and setup discriminator
to the LogDeviceConfig() method
* Removed if CHIP_PROGRESS_LOGGING condition before LogDeviceConfig()
implementation, as it should be checked before calling it (and is already
used there)
* Created interface to the LogDeviceConfig() to allow using it in samples
* Removed returning setupPinCode from the QRCodeUtil::GetQRCode() method.
* Removed printing setup pin code from the PrintQRCode method().
* Aligned nrfconnect, EFR32 and QPG6100 samples, because of
the QRCodeUtil API changes.

* Restyled by clang-format

Co-authored-by: Restyled.io <commits@restyled.io>
austinh0 pushed a commit to austinh0/connectedhomeip that referenced this pull request Jan 28, 2021
…chip#4495)

* Removed logs from the configuration manager getter methods.

Getter methods of the Configuration Manager contain logs, what results
in printing the same logs multiple times on the console.

* Removed logs from Configuration Manager getter methods
* Added printing information about setup pin code and setup discriminator
to the LogDeviceConfig() method
* Removed if CHIP_PROGRESS_LOGGING condition before LogDeviceConfig()
implementation, as it should be checked before calling it (and is already
used there)
* Created interface to the LogDeviceConfig() to allow using it in samples
* Removed returning setupPinCode from the QRCodeUtil::GetQRCode() method.
* Removed printing setup pin code from the PrintQRCode method().
* Aligned nrfconnect, EFR32 and QPG6100 samples, because of
the QRCodeUtil API changes.

* Restyled by clang-format

Co-authored-by: Restyled.io <commits@restyled.io>
@kkasperczyk-no kkasperczyk-no deleted the setup_logs_refactor_pr branch June 14, 2021 06:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants