summaryrefslogtreecommitdiff
path: root/src/gpg-error.def.in
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2017-11-17 09:37:54 +0100
committerWerner Koch <wk@gnupg.org>2017-11-17 09:48:30 +0100
commit1b653e7f37e2eb2a8f590a43651eb8aecbe8756e (patch)
tree07981a1260494dc7a94e3e266743fb58070416a2 /src/gpg-error.def.in
parent9c904765c9b2b75e73b196b381470f0fb2f3b458 (diff)
downloadlibgpg-error-1b653e7f37e2eb2a8f590a43651eb8aecbe8756e.tar.gz
core: Add logging API.
* src/visibility.c (gpgrt_get_errorcount): New API. (gpgrt_inc_errorcount): New API. (gpgrt_log_set_sink): New API. (gpgrt_log_set_socket_dir_cb): New API. (gpgrt_log_set_pid_suffix_cb): New API. (gpgrt_log_set_prefix): New API. (gpgrt_log_get_prefix): New API. (gpgrt_log_test_fd): New API. (gpgrt_log_get_fd): New API. (gpgrt_log_get_stream): New API. (gpgrt_log): New API. (gpgrt_logv): New API. (gpgrt_logv_prefix): New API. (gpgrt_log_string): New API. (gpgrt_log_info): New API. (gpgrt_log_error): New API. (gpgrt_log_fatal): New API. (gpgrt_log_bug): New API. (gpgrt_log_debug): New API. (gpgrt_log_debug_string): New API. (gpgrt_log_printf): New API. (gpgrt_log_flush): New API. (gpgrt_log_printhex): New API. (gpgrt_log_clock): New API. (_gpgrt_log_assert): New function for the ABI. * src/visibility.h: Add corresponding macros. * src/gpg-error.def.in: Add new functions. * src/gpg-error.vers: Add new functions. * src/gpg-error.h.in (GPGRT_LOG_WITH_PREFIX): New constant. (GPGRT_LOG_WITH_TIME): New constant. (GPGRT_LOG_WITH_PID): New constant. (GPGRT_LOG_RUN_DETACHED): New constant. (GPGRT_LOG_NO_REGISTRY): New constant. (GPGRT_LOG_BEGIN): New enum value. (GPGRT_LOG_CONT): New enum value. (GPGRT_LOG_INFO): New enum value. (GPGRT_LOG_WARN): New enum value. (GPGRT_LOG_ERROR): New enum value. (GPGRT_LOG_FATAL): New enum value. (GPGRT_LOG_BUG): New enum value. (GPGRT_LOG_DEBUG): New enum value. (log_get_errorcount, log_inc_errorcount, log_set_file, log_set_fd) (log_set_stream, log_set_socket_dir_cb, log_set_pid_suffix_cb) (log_set_prefix, log_get_prefix, log_test_fd, log_get_fd) (log_get_stream, log_log, log_logv, log_logv_prefix, log_string) (log_bug, log_fatal, log_error, log_info, log_debug, log_debug_string) (log_printf, log_printhex, log_clock) (log_flush) [GPGRT_ENABLE_LOG_MACROS]: New wrapper macros. (gpgrt_assert): New macro. * src/gpgrt-int.h: Add prototypes for logging.c. (gpgrt_assert): Redefine for internal use. * src/logging.h: Remove. * src/logging.c: Include gpgrt-int.h instead of the stuff from GnuPG. Use _gpgrt malloc funcsions and the internal versions of the estream functions. Rename all public fucntions with a _gpgrt_ prefix. (print_prefix): Return the printed length. (_gpgrt_logv_internal): Ditto. (_gpgrt_log_printhex): Change order of args and turn into a printf like function. (_gpgrt_logv_printhex): New. Take the core of the former log_printhex. (_gpgrt_log_clock): Turn into a printf like functions. (_gpgrt_logv_clock): New. Take the core of the former log_clock. -- This logging API is a slightly modified version of what we are using in GnuPG. Signed-off-by: Werner Koch <wk@gnupg.org>
Diffstat (limited to 'src/gpg-error.def.in')
-rw-r--r--src/gpg-error.def.in28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/gpg-error.def.in b/src/gpg-error.def.in
index ad65f8c..b718c7a 100644
--- a/src/gpg-error.def.in
+++ b/src/gpg-error.def.in
@@ -15,6 +15,7 @@
*
* You should have received a copy of the GNU Lesser General Public
* License along with this program; if not, see <https://www.gnu.org/licenses/>.
+ * SPDX-License-Identifier: LGPL-2.1+
*
* Note: This file should be updated manually and the ordinals shall
* never be changed. Also check gpg-error.vers and visibility.h.
@@ -156,4 +157,31 @@ EXPORTS
gpgrt_b64dec_proc @114
gpgrt_b64dec_finish @115
+ gpgrt_get_errorcount @116
+ gpgrt_inc_errorcount @117
+ gpgrt_log_set_sink @118
+ gpgrt_log_set_socket_dir_cb @119
+ gpgrt_log_set_pid_suffix_cb @120
+ gpgrt_log_set_prefix @121
+ gpgrt_log_get_prefix @122
+ gpgrt_log_test_fd @123
+ gpgrt_log_get_fd @124
+ gpgrt_log_get_stream @125
+ gpgrt_log @126
+ gpgrt_logv @127
+ gpgrt_logv_prefix @128
+ gpgrt_log_string @129
+ gpgrt_log_bug @130
+ gpgrt_log_fatal @131
+ gpgrt_log_error @132
+ gpgrt_log_info @133
+ gpgrt_log_debug @134
+ gpgrt_log_debug_string @135
+ gpgrt_log_printf @136
+ gpgrt_log_printhex @137
+ gpgrt_log_clock @138
+ gpgrt_log_flush @139
+ _gpgrt_log_assert @140
+
+
;; end of file with public symbols for Windows.