[Libreoffice-bugs] [Bug 130924] replace debugging printf calls with SAL_INFO/SAL_WARN

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Mon Aug 16 10:40:19 UTC 2021


https://bugs.documentfoundation.org/show_bug.cgi?id=130924

--- Comment #13 from Hossein <hossein at libreoffice.org> ---
You should try to choose between SAL_INFO and SAL_WARN based on the printed
content, and the context. If you are about to print some INFORMATION, then
choose SAL_INFO, and if it a WARNING then you should use SAL_WARN.

This is useful for deciding:
https://bugs.documentfoundation.org/show_bug.cgi?id=91794#c0

If not understandable from the context, you can choose the equivalent
replacement:

-----
#if OSL_DEBUG_LEVEL > 2
fprintf(...)
#endif
-----
should become: SAL_INFO(...)

-----
#if OSL_DEBUG_LEVEL > 1
fprintf(...)
#endif
-----
should become: SAL_WARN(...)

-----
#if OSL_DEBUG_LEVEL > 0
fprintf(...)
#endif
-----
should become: SAL_WARN(...)

Please note that you should remove '#if OSL_DEBUG_LEVEL > x' and '#endif'.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20210816/53e80916/attachment-0001.htm>


More information about the Libreoffice-bugs mailing list