<html>
<head>
<base href="https://bugs.documentfoundation.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_UNCONFIRMED "
title="UNCONFIRMED - replace debugging printf calls with SAL_INFO/SAL_WARN"
href="https://bugs.documentfoundation.org/show_bug.cgi?id=130924">130924</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>replace debugging printf calls with SAL_INFO/SAL_WARN
</td>
</tr>
<tr>
<th>Product</th>
<td>LibreOffice
</td>
</tr>
<tr>
<th>Version</th>
<td>Inherited From OOo
</td>
</tr>
<tr>
<th>Hardware</th>
<td>All
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Status</th>
<td>UNCONFIRMED
</td>
</tr>
<tr>
<th>Severity</th>
<td>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>medium
</td>
</tr>
<tr>
<th>Component</th>
<td>LibreOffice
</td>
</tr>
<tr>
<th>Assignee</th>
<td>libreoffice-bugs@lists.freedesktop.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>michael.stahl@cib.de
</td>
</tr></table>
<p>
<div>
<pre>git grep "\(\b\|f\)printf"
shows that there about 3100 calls to various printf functions.
A substantial part of these are debugging output from C++ source files;
those should be replaced with SAL_INFO typically.
There is also a substantial part which should *not* be replaced:
* printf calls in shell scripts and Makefiles and AWK and Perl
* C source files
* ancient code in */test and */workben directories
* printf that are not for debugging but printing help messages for the end user
* printf that are not for debugging but producing output from some tool
* printf in external/ and odk/ and onlineupdate/source/libmar/
* printf in sal/ (there are bootstrapping problems here)
To a first approximation, a good heuristic is that a printf should be replaced
if it's inside a #ifdef OSL_DEBUG_LEVEL or #ifdef DBGUTIL or similar.
For an example commit see
<a href="https://gerrit.libreoffice.org/plugins/gitiles/core/+/a8e83ce1d86892061603159f5c4460803d077fd5%5E!/">https://gerrit.libreoffice.org/plugins/gitiles/core/+/a8e83ce1d86892061603159f5c4460803d077fd5%5E!/</a>
The first argument to SAL_INFO is a "log area", see
include/sal/log-areas.dox for existing ones; it may be necessary to add new log
areas there.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>