diff options
author | Stef Walter <stefw@gnome.org> | 2012-04-03 11:02:00 +0200 |
---|---|---|
committer | Stef Walter <stefw@gnome.org> | 2012-04-03 11:53:32 +0200 |
commit | 60bcb157893ac25069353fc18f0885bc6b55a2b7 (patch) | |
tree | 1a8a419b94d4fb3289d73f09e5e5b77cbba1a052 /README | |
parent | 5854d4968f6892bbf48109840500563e8b813866 (diff) | |
download | gcr-60bcb157893ac25069353fc18f0885bc6b55a2b7.tar.gz |
Fix up GCR_DEBUG and GCK_DEBUG environment variables
* This is due to the G_MESSAGES_DEBUG change in glib
* We manage our own debug categories, so if G_MESSAGES_DEBUG
is not being used but GCR_DEBUG or GCK_DEBUG are set
we unconditionally print the debug messages.
* If G_MESSAGES_DEBUG is being used, then make all the
debug messages available to Glib.
* Can build with -DGCR_DEBUG=category flags to permanently
enable certain categories.
Diffstat (limited to 'README')
-rw-r--r-- | README | 37 |
1 files changed, 37 insertions, 0 deletions
@@ -4,3 +4,40 @@ desktop. GCK is a library for accessing PKCS#11 modules like smart cards, in a (G)object oriented way. + + +DEBUG TRACING +============== + +The Gcr and Gck libraries contain statements which help debug flow +and logic. In many cases these help you track down problems. + +Use the environment variable GCR_DEBUG='all' or GCR_HELP='xxx' to +display either all messages or a specific category of debug messages. +To figure out what you can use in place of the 'xxx' category above, +use GCR_DEBUG='help' and you'll see a list of all the messages. + +Example to display all debug messages: + + $ GCR_DEBUG=all gcr-viewer /path/to/certificate.crt + (gcr-viewer:9418): Gcr-DEBUG: gcr_pkcs11_initialize_async: starting initialize of registered modules + ... + +Example to display the various debug categories: + + $ GCR_DEBUG=help gcr-viewer /path/to/certificate.crt + Supported debug values: library certificate-chain parse gnupg trust import key prompt all help + +Example to display debug messages for a specific category: + + $ GCR_DEBUG=library gcr-viewer /path/to/certificate.crt + (gcr-viewer:9503): Gcr-DEBUG: gcr_pkcs11_initialize_async: starting initialize of registered modules + ... + +If you wish to permanently enable certain debug messages, include compiler +directives like this when configuring this library: + + $ CFLAGS='-DGCR_DEBUG=library' ./configure ... + +For the Gck debug messages simply replace 'GCR_DEBUG' with 'GCK_DEBUG' +in the above examples. |