Main Page | Modules | Alphabetical List | Data Structures | File List | Data Fields | Globals

log.c File Reference

#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <signal.h>
#include <time.h>
#include <errno.h>
#include "log.h"
#include "util.h"
#include "common.h"
#include "hashtable.h"

Go to the source code of this file.

Data Structures

struct  _error_code_legend


Detailed Description

libcprops logging facilities implementation

Definition in file log.c.


Function Documentation

void cp_dump int  log_level,
cp_string str
 

hex dump a cp_string

Definition at line 665 of file log.c.

Referenced by cp_ndump().

void cp_error int  code,
char *  msg,
  ...
 

print out a LOG_LEVEL_ERROR log message

Definition at line 465 of file log.c.

References cp_hashtable_get().

Referenced by cp_client_connect(), cp_client_reopen(), cp_connection_descriptor_create(), cp_connection_descriptor_write(), cp_connection_descrpitor_read(), cp_db_connection_close_statement(), cp_db_connection_commit(), cp_db_connection_escape_binary(), cp_db_connection_escape_string(), cp_db_connection_execute_statement(), cp_db_connection_execute_statement_args(), cp_db_connection_pool_create(), cp_db_connection_prepare_statement(), cp_db_connection_rollback(), cp_db_connection_set_autocommit(), cp_db_connection_set_fetch_size(), cp_db_connection_set_read_result_set_at_once(), cp_db_connection_unescape_binary(), cp_http_service_create(), cp_httpclient_fetch_ctl_exec(), cp_httpclient_init(), cp_httpsocket_create(), cp_pooled_thread_run_task(), cp_result_set_get_field_types(), cp_result_set_get_headers(), cp_result_set_next(), cp_socket_create(), cp_string_create(), and cp_thread_pool_create().

void cp_fatal int  code,
char *  msg,
  ...
 

print out a LOG_LEVEL_FATAL log message and exit. if log_level is LOG_LEVEL_SILENT, the error message is supressed but the process still exits.

Definition at line 568 of file log.c.

Referenced by cp_client_init(), cp_pooled_thread_client_interface_create(), cp_pooled_thread_scheduler_create(), and cp_thread_pool_create().

void cp_log const char *  msg,
  ...
 

unconditionally log a message

Definition at line 242 of file log.c.

Referenced by cp_http_response_write().

void cp_ndump int  log_level,
cp_string str,
size_t  len
 

hex dump up to len bytes of a cp_string

Definition at line 726 of file log.c.

References cp_dump().

Referenced by cp_http_response_write().

void cp_nlog size_t  len,
const char *  msg,
  ...
 

unconditionally log a limited length message

Definition at line 257 of file log.c.

Referenced by cp_http_response_write().

void cp_perror int  code,
int  errno_code,
char *  msg,
  ...
 

print out a LOG_LEVEL_ERROR log message with an errno code

Definition at line 509 of file log.c.

References cp_hashtable_get().

Referenced by cp_client_close(), cp_client_create(), cp_client_reopen(), cp_socket_connection_close(), and cp_socket_listen().

void cp_warn char *  msg,
  ...
 

print out a LOG_LEVEL_WARNING log message

Definition at line 451 of file log.c.

Referenced by cp_http_service_delete().


Generated on Sat Dec 1 10:25:30 2007 for cprops by  doxygen 1.3.9.1