<feed xmlns='http://www.w3.org/2005/Atom'>
<title>gpgme/src/debug.c, branch gpgme-1.23.1</title>
<subtitle>GnuPG Made Easy.</subtitle>
<id>http://git.bktus.com/gpgfrontend/gpgme/atom?h=gpgme-1.23.1</id>
<link rel='self' href='http://git.bktus.com/gpgfrontend/gpgme/atom?h=gpgme-1.23.1'/>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/'/>
<updated>2023-02-10T10:12:52Z</updated>
<entry>
<title>core: Switch to logging via gpgrt</title>
<updated>2023-02-10T10:12:52Z</updated>
<author>
<name>Werner Koch</name>
<email>wk@gnupg.org</email>
</author>
<published>2023-02-10T10:11:56Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=9c5506fde701f637381614dcfe22e3f9dc82955d'/>
<id>urn:sha1:9c5506fde701f637381614dcfe22e3f9dc82955d</id>
<content type='text'>
* src/debug.c (errfp): Remove.
(debug_init): Factor some code out to ...
(safe_to_use_debug_file): new.
(tid_log_callback): New.
(debug_init): Rewrite to make use of gpgrt logging.
(_gpgme_debug): Ditto.
(_gpgme_debug_end): Remove extra LF testing code.
* src/dirinfo.c (get_gpgconf_item): Remove now unneeded LFs.  Realign
output.
</content>
</entry>
<entry>
<title>core: At debug levels up to 9 print only an ascii dump.</title>
<updated>2019-06-13T06:46:16Z</updated>
<author>
<name>Werner Koch</name>
<email>wk@gnupg.org</email>
</author>
<published>2019-06-12T10:31:44Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=4f11210b21a1914a1daf67474e9b82084b2cac01'/>
<id>urn:sha1:4f11210b21a1914a1daf67474e9b82084b2cac01</id>
<content type='text'>
* src/debug.c (_gpgme_debug_buffer): Switch between two output
formats.
--

The new format is much more practical than the bunch of hex digits
followed by just 16 ascii chars.  To get the old behaviour use a debug
level of 10.

Signed-off-by: Werner Koch &lt;wk@gnupg.org&gt;
</content>
</entry>
<entry>
<title>core: Prettify _gpgme_io_select debug output again and fix TRACE_SYSRES.</title>
<updated>2019-06-05T14:48:47Z</updated>
<author>
<name>Werner Koch</name>
<email>wk@gnupg.org</email>
</author>
<published>2019-06-05T14:37:59Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=0f68c9f16bdae7295cac4cbf3c9a197840989a85'/>
<id>urn:sha1:0f68c9f16bdae7295cac4cbf3c9a197840989a85</id>
<content type='text'>
* src/debug.c (_gpgme_debug): Take better care of NULL userinfo.
(_gpgme_debug_end): Rework.
(_trace_sysres): Print ERRNO and not the supplied RES.
--

The TRACE_SYSRES patch fixes
Regression-due-to: 7a1e7006d06fdbab86ea79a197c316744b09d933

Signed-off-by: Werner Koch &lt;wk@gnupg.org&gt;
</content>
</entry>
<entry>
<title>core: Improve the debug messages even more.</title>
<updated>2019-06-05T13:54:55Z</updated>
<author>
<name>Werner Koch</name>
<email>wk@gnupg.org</email>
</author>
<published>2019-06-05T13:48:33Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=8f9f3224aac78ce9d54e19e73acf7ab659787168'/>
<id>urn:sha1:8f9f3224aac78ce9d54e19e73acf7ab659787168</id>
<content type='text'>
* src/debug.c (_gpgme_debug): Add arg LINE.  Chnage all callers.
(_gpgme_debug_begin): Remove.
* src/debug.h (TRACE_SEQ): Use the LINE arg of _gpgme_debug.
--

This includes chnages to always print fds in decimal as weel as
tweaking the TARCE_SEQ function to make use of the new machinery.

The standard 'tag' can now always be NULL and no tag information will
be printed.

Signed-off-by: Werner Koch &lt;wk@gnupg.org&gt;
</content>
</entry>
<entry>
<title>core: Avoid explicit locks in the debug code.</title>
<updated>2019-06-05T11:11:16Z</updated>
<author>
<name>Werner Koch</name>
<email>wk@gnupg.org</email>
</author>
<published>2019-06-05T11:10:52Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=856d2e8d64f668855b1c22d3d38fe783904c6c48'/>
<id>urn:sha1:856d2e8d64f668855b1c22d3d38fe783904c6c48</id>
<content type='text'>
* src/debug.c (debug_lock): Remove.  Also remove all users.
(_gpgme_debug): Use gpgrt_bsprintf to prepare the output and finally
print using standard fprintf.  Reformat to prefix to be narrower.
--

Note that the locks are now implicitly done using the systems stdio.

The threadid is now printed with 4 digits in hex and thus without the
angle brackets and the 0x.  However it is still a hex number even if it
may look like an octal number.  The hex letters are uppercase to make
searching in locks easier iff the threadid happens to have a letter in
it.

Signed-off-by: Werner Koch &lt;wk@gnupg.org&gt;
</content>
</entry>
<entry>
<title>core, w32: Fix format string errors on windows</title>
<updated>2019-03-27T16:47:41Z</updated>
<author>
<name>Andre Heinecke</name>
<email>aheinecke@gnupg.org</email>
</author>
<published>2019-03-27T16:47:41Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=4a4680f8901ecdcb7e8d5ed55f48226ccfccd7c8'/>
<id>urn:sha1:4a4680f8901ecdcb7e8d5ed55f48226ccfccd7c8</id>
<content type='text'>
* src/debug.c (_gpgme_debug): Use gpgrt_vasprintf instead of
vfprintf to have a more portable format.

--
This fixes crashes on Windows because "%zu" is used which
is not natively supported on Windows but which gpgrt supports.
</content>
</entry>
<entry>
<title>core: Fix a LF problem in the new debug fucntion.</title>
<updated>2018-11-16T17:15:22Z</updated>
<author>
<name>Werner Koch</name>
<email>wk@gnupg.org</email>
</author>
<published>2018-11-16T17:15:22Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=7eda50a673d15320022375360fd220e8381b69ab'/>
<id>urn:sha1:7eda50a673d15320022375360fd220e8381b69ab</id>
<content type='text'>
* src/debug.c (_gpgme_debug): Print a LF for an empty FORMAT unless we
are in legacy mode.
</content>
</entry>
<entry>
<title>core: Fix format string errors in trace macros</title>
<updated>2018-11-16T15:57:09Z</updated>
<author>
<name>Werner Koch</name>
<email>wk@gnupg.org</email>
</author>
<published>2018-11-16T15:57:09Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=cf423864062a2677d0eeabbb11462a788f527b4c'/>
<id>urn:sha1:cf423864062a2677d0eeabbb11462a788f527b4c</id>
<content type='text'>
--

Signed-off-by: Werner Koch &lt;wk@gnupg.org&gt;
</content>
</entry>
<entry>
<title>core: Remove old debug helper function</title>
<updated>2018-11-16T15:39:26Z</updated>
<author>
<name>Werner Koch</name>
<email>wk@gnupg.org</email>
</author>
<published>2018-11-16T15:39:26Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=94d274a1a33c6fb30981290b127f2c4babc27245'/>
<id>urn:sha1:94d274a1a33c6fb30981290b127f2c4babc27245</id>
<content type='text'>
* src/debug.c (_gpgme_debug): Remove.
(_gpgme_debugf): Rename to _gpgme_debug.

Signed-off-by: Werner Koch &lt;wk@gnupg.org&gt;
</content>
</entry>
<entry>
<title>core: Simplify the trace maros by using variadics.</title>
<updated>2018-11-16T15:25:49Z</updated>
<author>
<name>Werner Koch</name>
<email>wk@gnupg.org</email>
</author>
<published>2018-11-16T15:25:49Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=5857491a2aa7d4975100d90f1ad62c08aa345e3e'/>
<id>urn:sha1:5857491a2aa7d4975100d90f1ad62c08aa345e3e</id>
<content type='text'>
* src/debug.h (TRACE_BEG, TRACE_LOG, TRACE_SUC): Use variadic macros
and remove the TRACE_BEG1 et al.  Change all users to always pass a
format string.
(TRACE): Ditto.
* src/debug.c (_gpgme_debugf): New.
* configure.ac &lt;GCC&gt;: Add -Wno-format-zero-length.
--

This makes it easier for use to enable format checks.  The zero-length
format is required to allow for an empty format due to the comman
problematic of __VA_ARGS__.

Signed-off-by: Werner Koch &lt;wk@gnupg.org&gt;
</content>
</entry>
</feed>
