Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Consistent logging errors and warnings #355

Open
hiker opened this issue Nov 25, 2024 · 0 comments
Open

Consistent logging errors and warnings #355

hiker opened this issue Nov 25, 2024 · 0 comments
Labels
BOM Issues copied from the BOM fork

Comments

@hiker
Copy link
Collaborator

hiker commented Nov 25, 2024

Currently errors and warnings are recorded in different ways:
(1) using logger
(2) warnings.warn
(3) print statements

Print statements would not go into the log.txt file generated by FAB, therefore resulting in losing error or warning information for debugging. An example of this is: https://github.com/hiker/fab_new/blob/282f068420577e9b6065fd086cc879124c1d86ba/source/fab/steps/analyse.py#L268C9-L268C15 I once had this error because of not having clang available for c file analysis. However, this error did not get into the log.txt file. The reported error in the log.txt file is key error of lookup in

f.file_deps.add(lookup[dep].fpath)
.
It was not obvious to me at first instinct that this key error was due to the analysis failure earlier. I had to go through some extensive debugging steps locally to find this out.

It would be good if the error and warning logging can be consistent with using logger.

@hiker hiker added the BOM Issues copied from the BOM fork label Nov 25, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
BOM Issues copied from the BOM fork
Projects
None yet
Development

No branches or pull requests

1 participant