]>
git.ipfire.org Git - thirdparty/openssl.git/blob - apps/include/log.h
2 * Copyright 1995-2022 The OpenSSL Project Authors. All Rights Reserved.
4 * Licensed under the Apache License 2.0 (the "License"). You may not use
5 * this file except in compliance with the License. You can obtain a copy
6 * in the file LICENSE in the source distribution or at
7 * https://www.openssl.org/source/license.html
10 #ifndef OSSL_APPS_LOG_H
11 # define OSSL_APPS_LOG_H
13 # include <openssl/bio.h>
14 # if !defined(OPENSSL_SYS_VMS) && !defined(OPENSSL_SYS_WINDOWS) \
15 && !defined(OPENSSL_NO_SOCK) && !defined(OPENSSL_NO_POSIX_IO)
22 # define LOG_WARNING 4
29 # define LOG_TRACE (LOG_DEBUG + 1)
31 int log_set_verbosity(const char *prog
, int level
);
32 int log_get_verbosity(void);
35 * Output a message using the trace API with the given category
36 * if the category is >= 0 and tracing is enabled.
37 * Log the message to syslog if multi-threaded HTTP_DAEMON, else to bio_err
38 * if the verbosity is sufficient for the given level of severity.
39 * Yet cannot do both types of output in strict ANSI mode.
40 * category: trace category as defined in trace.h, or -1
41 * prog: the name of the current app, or NULL
42 * level: the severity of the message, e.g., LOG_ERR
43 * fmt: message format, which should not include a trailing newline
44 * ...: potential extra parameters like with printf()
47 void trace_log_message(int category
,
48 const char *prog
, int level
, const char *fmt
, ...);
50 #endif /* OSSL_APPS_LOG_H */