28 #define LOG_UTIL_MCL_SYSLOG "mcl_syslog" 39 "MCL_TRIGGERED_WITH_NULL",
41 "MCL_INVALID_PARAMETER",
42 "MCL_NO_FILE_SUPPORT",
43 "MCL_NO_STORAGE_MEDIUM",
44 "MCL_INVALID_LOG_LEVEL",
45 "MCL_OPERATION_IS_NOT_SUPPORTED",
46 "MCL_FILE_CANNOT_BE_OPENED",
47 "MCL_JSON_NAME_DUPLICATION",
48 "MCL_INDEX_OUT_OF_RANGE",
49 "MCL_ITEM_ALREADY_EXISTS",
50 "MCL_INVALID_EVENT_SEVERITY_LEVEL",
52 "MCL_NO_ACCESS_TOKEN_EXISTS",
53 "MCL_INVALID_HOST_NAME",
54 "MCL_INVALID_CERTIFICATE",
55 "MCL_INVALID_PROXY_HOST_NAME",
56 "MCL_INVALID_PROXY_USER_NAME",
57 "MCL_INVALID_PROXY_PASSWORD",
58 "MCL_INVALID_PROXY_DOMAIN",
59 "MCL_INVALID_SECURITY_PROFILE",
60 "MCL_INVALID_USER_AGENT",
62 "MCL_INVALID_MAX_HTTP_PAYLOAD_SIZE",
63 "MCL_NO_ACCESS_TOKEN_PROVIDED",
64 "MCL_PATH_NOT_ACCESSIBLE",
65 "MCL_COULD_NOT_RESOLVE_PROXY",
66 "MCL_COULD_NOT_RESOLVE_HOST",
67 "MCL_COULD_NOT_CONNECT",
68 "MCL_SSL_HANDSHAKE_FAIL",
69 "MCL_NETWORK_SEND_FAIL",
70 "MCL_NETWORK_RECEIVE_FAIL",
71 "MCL_SERVER_CERTIFICATE_NOT_VERIFIED",
72 "MCL_IMPROPER_CERTIFICATE",
73 "MCL_REQUEST_TIMEOUT",
76 "MCL_PARTIAL_CONTENT",
82 "MCL_PRECONDITION_FAIL",
83 "MCL_REQUEST_PAYLOAD_TOO_LARGE",
84 "MCL_TOO_MANY_REQUESTS",
85 "MCL_UNEXPECTED_RESULT_CODE",
86 "MCL_NOT_INITIALIZED",
88 "MCL_ALREADY_ONBOARDED",
90 "MCL_EXCHANGE_STREAMING_IS_ACTIVE",
91 "MCL_SECURITY_UP_TO_DATE",
92 "MCL_CANNOT_ENTER_CRITICAL_SECTION",
93 "MCL_INITIALIZATION_FAIL",
94 "MCL_STORE_ITEM_EXCEEDS_MAX_HTTP_REQUEST_SIZE",
95 "MCL_UNDEFINED_ENDPOINT",
96 "MCL_BAD_CONTENT_ENCODING",
97 "MCL_NON_EXISTING_JSON_CHILD",
98 "MCL_SHA256_CALCULATION_FAIL",
99 "MCL_SERVER_PROOF_FAIL",
100 "MCL_REGISTRATION_INFO_IS_NOT_SAVED",
101 "MCL_REGISTRATION_INFO_IS_NOT_LOADED",
102 "MCL_BUFFER_OVERFLOW_ERROR",
103 "MCL_HTTP_REQUEST_NO_MORE_SPACE",
104 "MCL_LIMIT_EXCEEDED",
105 "MCL_ARRAY_IS_EMPTY",
106 "MCL_PARTIALLY_WRITTEN",
107 "MCL_HTTP_REQUEST_FINALIZE_FAILED" 110 #if (1 == HAVE_SYSLOG_H_) 111 static int log_util_convert_to_syslog_level(
const int lvl)
115 case ZF_LOG_VERBOSE :
152 user_callback(message->lvl, message->tag, message->buf, user_context);
158 #if (1 == HAVE_SYSLOG_H_) 163 syslog(log_util_convert_to_syslog_level(message->lvl),
"%s", message->buf);
168 zf_log_out_stderr_callback(message, user_context);
178 zf_log_set_output_level(log_level);
192 va_start(valist, log_output);
206 #if (1 == HAVE_SYSLOG_H_) 216 user_context = va_arg(valist,
void*);
242 #if (1 == HAVE_SYSLOG_H_) 252 DEBUG_ENTRY(
"E_MCL_ERROR_CODE error_code = <%d>", error_code)
254 const char *error_string =
MCL_NULL;
E_MCL_ERROR_CODE file_util_fflush_without_log(void *file_descriptor)
Memory module header file.
E_MCL_ERROR_CODE mcl_log_util_initialize(E_LOG_OUTPUT log_output,...)
This function initializes logging where output channel is set and configured via variable arguments...
Log output channel is stderr.
E_MCL_ERROR_CODE file_util_fopen_without_log(const char *file_name, const char *mode, void **file_descriptor)
Given log level is invalid.
Log output channel is file.
Log utility module header file.
E_MCL_ERROR_CODE
MCL Error code definitions. Every function returning an error code uses this enum values...
const char * error_code_strings[MCL_ERROR_CODE_END]
Configuration setup module interface header file.
void mcl_log_util_finalize(void)
Performs finalizing operations for logging.
void(* mcl_log_util_callback_t)(int log_level, const char *tag, const char *message, void *user_context)
Log util callback function definition.
E_MCL_ERROR_CODE mcl_log_util_set_output_level(const int log_level)
Sets the global output level. The output level is used during runtime check. No logs are written if g...
E_MCL_ERROR_CODE file_util_fwrite_without_log(const void *data, mcl_size_t size, mcl_size_t count, void *file_descriptor)
General invalid parameter fail.
const char * mcl_log_util_convert_error_code_to_string(E_MCL_ERROR_CODE error_code)
This function converts the given error code to its string value.
#define LOG_UTIL_LEVEL_VERBOSE
static void log_util_default_callback(const zf_log_message *const message, void *user_context)
Definitions module header file.
File utility module header file.
#define LOG_UTIL_LEVEL_NONE
#define LOG_UTIL_LEVEL_FATAL
Log output channel is callback.
Log utility module interface header file.
E_LOG_OUTPUT log_output_global
#define LOG_UTIL_MCL_SYSLOG
E_MCL_ERROR_CODE file_util_fclose_without_log(void *file_descriptor)
Log output channel is syslog.
mcl_log_util_callback_t user_callback
E_LOG_OUTPUT
MCL Log output definitions.