diff options
author | Werner Koch <[email protected]> | 2024-04-22 12:47:53 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2024-04-22 12:47:53 +0000 |
commit | 319a505623c197d06ca3e76f30691fe65a982d6f (patch) | |
tree | ca4dfdb7f76a0a389487dcdcd6e70913c72afe47 /src/visibility.c | |
parent | logging: Indent continuation lines of log_printhex. (diff) | |
download | libgpg-error-319a505623c197d06ca3e76f30691fe65a982d6f.tar.gz libgpg-error-319a505623c197d06ca3e76f30691fe65a982d6f.zip |
core: New function gpgrt_add_post_log_func.
* src/gpg-error.h.in (gpgrt_add_post_log_func): New.
* src/gpg-error.vers: Add new function
* src/gpg-error.def.in: Ditto.
* src/visibility.c (gpgrt_add_post_log_func): New.
* src/logging.c (struct post_log_func_item_s): New.
(post_log_func_list): New.
(_gpgrt_add_post_log_func): new.
(run_post_log_funcs): New.
(_gpgrt_logv_internal): Call for fatal and bug log levels.
--
This is required in case an application or library needs to do do some
quick cleanups after a log_fatal.
Diffstat (limited to 'src/visibility.c')
-rw-r--r-- | src/visibility.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/visibility.c b/src/visibility.c index 5ecef45..8c00168 100644 --- a/src/visibility.c +++ b/src/visibility.c @@ -961,6 +961,14 @@ gpgrt_log_get_stream (void) return _gpgrt_log_get_stream (); } + +void +gpgrt_add_post_log_func (void (*f)(int)) +{ + _gpgrt_add_post_log_func (f); +} + + void gpgrt_log (int level, const char *fmt, ...) { |