Why are the log related macros defined in multiple of 10's
Open, Needs TriagePublic

Description

I want to understand the reason behind defining LOG_LEVEL_* macros as multiple of 10's, also same goes with LOG_MARKER_* macros

shitalt created this task.Dec 19 2019, 10:24 AM

If we set the LOG macros to 1,2,3 so on, we can avoid the mod and division operation when printing the msg to console.

Hello @shitalt ,

I am not aware of any specific reason for LOG_LEVEL values being multiple of 10's. I guess at the time we thought we should leave room in between values, just in case we'd like to add more intermediate values in the future. In the end, I think it proved unnecessary but it stayed like that. I don't foresee the need for more log levels today so IMHO it would be OK to change their values to 1,2,3 and so on, as you suggested.

That said, some TF-A users might have a different opinion. Phabricator does not get the same level of visibility as the mailing list. Could you please post your question on the mailing list instead, where it is likely to be seen by more people?
https://lists.trustedfirmware.org/mailman/listinfo/tf-a

Sorry for the inconvenience.

Regards,
Sandrine

Thanks @sandrine-bailleux-arm

I'll post this question to mailing list as suggested.

Thanks
Sheetal