nanohttp-logging.h File Reference

Go to the source code of this file.

Defines

#define NHTTP_ARG_LOGFILE   "-NHTTPlog"
#define NHTTP_ARG_LOGLEVEL   "-NHTTPloglevel"
#define log_verbose1(a1)   hlog_verbose(__FUNCTION__, a1)
#define log_verbose2(a1, a2)   hlog_verbose(__FUNCTION__, a1,a2)
#define log_verbose3(a1, a2, a3)   hlog_verbose(__FUNCTION__, a1,a2,a3)
#define log_verbose4(a1, a2, a3, a4)   hlog_verbose(__FUNCTION__, a1,a2,a3,a4)
#define log_verbose5(a1, a2, a3, a4, a5)   hlog_verbose(__FUNCTION__, a1,a2,a3,a4,a5)
#define log_debug1(a1)   hlog_debug(__FUNCTION__, a1)
#define log_debug2(a1, a2)   hlog_debug(__FUNCTION__, a1,a2)
#define log_debug3(a1, a2, a3)   hlog_debug(__FUNCTION__, a1,a2,a3)
#define log_debug4(a1, a2, a3, a4)   hlog_debug(__FUNCTION__, a1,a2,a3,a4)
#define log_debug5(a1, a2, a3, a4, a5)   hlog_debug(__FUNCTION__, a1,a2,a3,a4,a5)
#define log_info1(a1)   hlog_info(__FUNCTION__, a1)
#define log_info2(a1, a2)   hlog_info(__FUNCTION__, a1,a2)
#define log_info3(a1, a2, a3)   hlog_info(__FUNCTION__, a1,a2,a3)
#define log_info4(a1, a2, a3, a4)   hlog_info(__FUNCTION__, a1,a2,a3,a4)
#define log_info5(a1, a2, a3, a4, a5)   hlog_info(__FUNCTION__, a1,a2,a3,a4,a5)
#define log_warn1(a1)   hlog_warn(__FUNCTION__, a1)
#define log_warn2(a1, a2)   hlog_warn(__FUNCTION__, a1,a2)
#define log_warn3(a1, a2, a3)   hlog_warn(__FUNCTION__, a1,a2,a3)
#define log_warn4(a1, a2, a3, a4)   hlog_warn(__FUNCTION__, a1,a2,a3,a4)
#define log_warn5(a1, a2, a3, a4, a5)   hlog_warn(__FUNCTION__, a1,a2,a3,a4,a5)
#define log_error1(a1)   hlog_error(__FUNCTION__, a1)
#define log_error2(a1, a2)   hlog_error(__FUNCTION__, a1,a2)
#define log_error3(a1, a2, a3)   hlog_error(__FUNCTION__, a1,a2,a3)
#define log_error4(a1, a2, a3, a4)   hlog_error(__FUNCTION__, a1,a2,a3,a4)
#define log_error5(a1, a2, a3, a4, a5)   hlog_error(__FUNCTION__, a1,a2,a3,a4,a5)

Typedefs

typedef enum log_level log_level_t

Enumerations

enum  log_level {
  HLOG_VERBOSE, HLOG_DEBUG, HLOG_INFO, HLOG_WARN,
  HLOG_ERROR, HLOG_FATAL, HLOG_OFF
}

Functions

log_level_t hlog_set_level (log_level_t level)
log_level_t hlog_get_level (void)
void hlog_set_file (const char *filename)
char * hlog_get_file (void)
void hlog_verbose (const char *FUNC, const char *format,...)
void hlog_debug (const char *FUNC, const char *format,...)
void hlog_info (const char *FUNC, const char *format,...)
void hlog_warn (const char *FUNC, const char *format,...)
void hlog_error (const char *FUNC, const char *format,...)


Define Documentation

#define log_debug1 a1   )     hlog_debug(__FUNCTION__, a1)
 

Definition at line 116 of file nanohttp-logging.h.

#define log_debug2 a1,
a2   )     hlog_debug(__FUNCTION__, a1,a2)
 

Definition at line 117 of file nanohttp-logging.h.

#define log_debug3 a1,
a2,
a3   )     hlog_debug(__FUNCTION__, a1,a2,a3)
 

Definition at line 118 of file nanohttp-logging.h.

#define log_debug4 a1,
a2,
a3,
a4   )     hlog_debug(__FUNCTION__, a1,a2,a3,a4)
 

Definition at line 119 of file nanohttp-logging.h.

#define log_debug5 a1,
a2,
a3,
a4,
a5   )     hlog_debug(__FUNCTION__, a1,a2,a3,a4,a5)
 

Definition at line 120 of file nanohttp-logging.h.

#define log_error1 a1   )     hlog_error(__FUNCTION__, a1)
 

Definition at line 134 of file nanohttp-logging.h.

Referenced by _soap_env_get_body(), _soap_xmlsec_init(), hpairnode_get(), hpairnode_get_ignore_case(), hresponse_new_from_socket(), hssl_client_ssl(), hssl_server_ssl(), hurl_parse(), mime_get_attachments(), soap_env_add_attachment(), soap_env_add_item(), soap_env_find_methodname(), soap_env_find_urn(), soap_env_get_body(), soap_env_get_header(), soap_env_new_from_doc(), soap_fault_build(), soap_transport_add(), soap_xml_get_children(), soap_xml_get_next(), soap_xmlsec_decrypt(), soap_xmlsec_encrypt(), soap_xmlsec_sign(), and soap_xmlsec_verify().

#define log_error2 a1,
a2   )     hlog_error(__FUNCTION__, a1,a2)
 

Definition at line 135 of file nanohttp-logging.h.

Referenced by _soap_xmlsec_init(), attachments_new(), herror_new(), hpairnode_new(), hrequest_new_from_socket(), hsocket_bind(), hsocket_listen(), hsocket_module_init(), hsocket_open(), hssl_client_ssl(), hssl_server_ssl(), http_input_stream_new(), http_input_stream_new_from_file(), http_output_stream_new(), httpc_get(), httpc_mime_send_file(), httpc_new(), httpc_post_begin(), httpd_get_postdata(), httpd_init(), httpd_new(), httpd_register_secure(), httpd_run(), hurl_parse(), mime_message_parse(), mime_message_parse_from_file(), part_new(), soap_client_init_args(), soap_client_invoke(), soap_ctx_new(), soap_env_new_from_doc(), soap_fault_build(), soap_nhttp_client_init_args(), soap_nhttp_register(), soap_nhttp_server_init_args(), soap_nudp_server_init_args(), soap_nudp_server_run(), soap_nudp_server_run_threaded(), soap_router_new(), soap_server_init_args(), soap_server_process(), soap_server_register_router(), soap_service_new(), soap_service_node_new(), soap_transport_client_init_args(), soap_transport_register(), soap_transport_server_init_args(), soap_transport_server_run(), soap_xmlsec_decrypt(), soap_xmlsec_encrypt(), soap_xmlsec_server_init_args(), and soap_xmlsec_verify().

#define log_error3 a1,
a2,
a3   )     hlog_error(__FUNCTION__, a1,a2,a3)
 

Definition at line 136 of file nanohttp-logging.h.

#define log_error4 a1,
a2,
a3,
a4   )     hlog_error(__FUNCTION__, a1,a2,a3,a4)
 

Definition at line 137 of file nanohttp-logging.h.

Referenced by mime_streamreader_function().

#define log_error5 a1,
a2,
a3,
a4,
a5   )     hlog_error(__FUNCTION__, a1,a2,a3,a4,a5)
 

Definition at line 138 of file nanohttp-logging.h.

#define log_info1 a1   )     hlog_info(__FUNCTION__, a1)
 

Definition at line 122 of file nanohttp-logging.h.

Referenced by _soap_xmlsec_init().

#define log_info2 a1,
a2   )     hlog_info(__FUNCTION__, a1,a2)
 

Definition at line 123 of file nanohttp-logging.h.

Referenced by http_input_stream_free().

#define log_info3 a1,
a2,
a3   )     hlog_info(__FUNCTION__, a1,a2,a3)
 

Definition at line 124 of file nanohttp-logging.h.

#define log_info4 a1,
a2,
a3,
a4   )     hlog_info(__FUNCTION__, a1,a2,a3,a4)
 

Definition at line 125 of file nanohttp-logging.h.

#define log_info5 a1,
a2,
a3,
a4,
a5   )     hlog_info(__FUNCTION__, a1,a2,a3,a4,a5)
 

Definition at line 126 of file nanohttp-logging.h.

#define log_verbose1 a1   )     hlog_verbose(__FUNCTION__, a1)
 

Todo:
This isn't the "right" way
define log_debug(fmt, ...) fprintf(stderr, "EMERGENCY: %s: " fmt "\n", \ __FUNCTION__, ## __VA_ARGS__)

Definition at line 110 of file nanohttp-logging.h.

Referenced by hpairnode_dump(), hpairnode_dump_deep(), hsocket_close(), hssl_client_ssl(), hssl_module_init(), http_input_stream_new(), http_output_stream_new(), httpc_mime_send_file(), httpd_run(), soap_client_invoke(), soap_env_find_urn(), soap_env_get_method(), soap_fault_build(), soap_router_find_service(), soap_router_free(), soap_server_process(), and soap_transport_client_invoke().

#define log_verbose2 a1,
a2   )     hlog_verbose(__FUNCTION__, a1,a2)
 

Definition at line 111 of file nanohttp-logging.h.

Referenced by _soap_xmlsec_init(), hsocket_select_recv(), hssl_server_ssl(), soap_addressing_set_message_id_string(), soap_client_invoke(), soap_env_new_with_method(), soap_fault_build(), soap_router_find_service(), soap_router_free(), soap_server_destroy(), soap_server_process(), and soap_transport_client_invoke().

#define log_verbose3 a1,
a2,
a3   )     hlog_verbose(__FUNCTION__, a1,a2,a3)
 

Definition at line 112 of file nanohttp-logging.h.

Referenced by hpairnode_new(), hsocket_accept(), hsocket_close(), httpd_register_secure(), soap_server_process(), and soap_transport_client_invoke().

#define log_verbose4 a1,
a2,
a3,
a4   )     hlog_verbose(__FUNCTION__, a1,a2,a3,a4)
 

Definition at line 113 of file nanohttp-logging.h.

Referenced by hsocket_open(), soap_router_find_service(), and soap_router_register_service().

#define log_verbose5 a1,
a2,
a3,
a4,
a5   )     hlog_verbose(__FUNCTION__, a1,a2,a3,a4,a5)
 

Definition at line 114 of file nanohttp-logging.h.

Referenced by hpairnode_dump().

#define log_warn1 a1   )     hlog_warn(__FUNCTION__, a1)
 

Definition at line 128 of file nanohttp-logging.h.

Referenced by hssl_server_ssl(), httpc_add_header(), httpc_add_headers(), httpc_set_header(), httpd_add_header(), httpd_add_headers(), httpd_get_postdata(), httpd_set_header(), soap_env_find_urn(), and soap_service_new().

#define log_warn2 a1,
a2   )     hlog_warn(__FUNCTION__, a1,a2)
 

Definition at line 129 of file nanohttp-logging.h.

Referenced by hsocket_accept(), hsocket_recv(), hsocket_send(), httpc_new(), and hurl_parse().

#define log_warn3 a1,
a2,
a3   )     hlog_warn(__FUNCTION__, a1,a2,a3)
 

Definition at line 130 of file nanohttp-logging.h.

#define log_warn4 a1,
a2,
a3,
a4   )     hlog_warn(__FUNCTION__, a1,a2,a3,a4)
 

Definition at line 131 of file nanohttp-logging.h.

#define log_warn5 a1,
a2,
a3,
a4,
a5   )     hlog_warn(__FUNCTION__, a1,a2,a3,a4,a5)
 

Definition at line 132 of file nanohttp-logging.h.

#define NHTTP_ARG_LOGFILE   "-NHTTPlog"
 

Definition at line 27 of file nanohttp-logging.h.

#define NHTTP_ARG_LOGLEVEL   "-NHTTPloglevel"
 

Definition at line 28 of file nanohttp-logging.h.


Typedef Documentation

typedef enum log_level log_level_t
 


Enumeration Type Documentation

enum log_level
 

Enumerator:
HLOG_VERBOSE 
HLOG_DEBUG 
HLOG_INFO 
HLOG_WARN 
HLOG_ERROR 
HLOG_FATAL 
HLOG_OFF 

Definition at line 31 of file nanohttp-logging.h.


Function Documentation

void hlog_debug const char *  FUNC,
const char *  format,
  ...
 

Definition at line 171 of file nanohttp-logging.c.

References HLOG_DEBUG.

void hlog_error const char *  FUNC,
const char *  format,
  ...
 

Definition at line 201 of file nanohttp-logging.c.

References HLOG_ERROR.

char* hlog_get_file void   ) 
 

Get the filename of the logfile.

Returns:
Pointer to the filename or null otherwise.

Definition at line 110 of file nanohttp-logging.c.

log_level_t hlog_get_level void   ) 
 

Get the loglevel.

Returns:
The current loglevel.

Definition at line 85 of file nanohttp-logging.c.

void hlog_info const char *  FUNC,
const char *  format,
  ...
 

Definition at line 181 of file nanohttp-logging.c.

References HLOG_INFO.

void hlog_set_file const char *  filename  ) 
 

Set the logfile.

Parameters:
filename The filename of the logfile.

Definition at line 91 of file nanohttp-logging.c.

log_level_t hlog_set_level log_level_t  level  ) 
 

Set the loglevel.

Parameters:
level The new loglevel.
Returns:
The old loglevel.

Definition at line 77 of file nanohttp-logging.c.

void hlog_verbose const char *  FUNC,
const char *  format,
  ...
 

Definition at line 161 of file nanohttp-logging.c.

References HLOG_VERBOSE.

void hlog_warn const char *  FUNC,
const char *  format,
  ...
 

Definition at line 191 of file nanohttp-logging.c.

References HLOG_WARN.


Generated on Thu Jan 25 23:36:03 2007 for csoap by  doxygen 1.4.6