[libsoup/wip/ci-pkcs11: 1/2] Add logging
- From: Patrick Griffis <pgriffis src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libsoup/wip/ci-pkcs11: 1/2] Add logging
- Date: Sun, 30 May 2021 17:03:25 +0000 (UTC)
commit 0d51b16eccc79f595cb840b4a0a059f017338316
Author: Patrick Griffis <pgriffis igalia com>
Date: Sun May 30 11:53:32 2021 -0500
Add logging
tests/ssl-test.c | 11 +++++++++++
1 file changed, 11 insertions(+)
---
diff --git a/tests/ssl-test.c b/tests/ssl-test.c
index b967606a..f403744d 100644
--- a/tests/ssl-test.c
+++ b/tests/ssl-test.c
@@ -522,6 +522,14 @@ server_handler (SoupServer *server,
"ok\r\n", 4);
}
+#if HAVE_GNUTLS
+static void
+log_func (int level, const char *message)
+{
+ g_info ("[GNUTLS %d] %.*s", level, (int)strlen (message) - 1, message);
+}
+#endif
+
int
main (int argc, char **argv)
{
@@ -531,6 +539,9 @@ main (int argc, char **argv)
test_init (argc, argv, NULL);
#if HAVE_GNUTLS
+ gnutls_global_set_log_level (4);
+ gnutls_global_set_log_function (log_func);
+
char *module_path = soup_test_build_filename_abs (G_TEST_BUILT, "mock-pkcs11.so", NULL);
g_assert_true (g_file_test (module_path, G_FILE_TEST_EXISTS));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]