Kannel: Open Source WAP and SMS gateway
svn-r5336
|
#include "gwlib.h"
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <time.h>
#include <stdarg.h>
#include <string.h>
#include <ctype.h>
Go to the source code of this file.
Macros | |
#define | MAX_LOGFILES 4096 |
#define | THREADTABLE_SIZE 1024 |
#define | thread_slot() (gwthread_self() % THREADTABLE_SIZE) |
#define | MAX_LOGGABLE_PLACES (10*1000) |
#define | FORMAT_SIZE (1024) |
#define | FUNCTION_GUTS(level, place) |
#define | FUNCTION_GUTS_EXCL(level, place) |
Enumerations | |
enum | { LOG_PID, LOG_DAEMON, LOG_DEBUG, LOG_INFO, LOG_WARNING, LOG_ERR, LOG_ALERT } |
Functions | |
static int | decode (char *name) |
static void | openlog (const char *ident, int option, int facility) |
static void | syslog (int translog, const char *msg,...) |
static void | closelog (void) |
static void | add_stderr (void) |
void | log_init (void) |
void | log_shutdown (void) |
void | log_set_output_level (enum output_level level) |
void | log_set_log_level (enum output_level level) |
void | log_set_syslog_facility (char *facility) |
void | log_set_syslog (const char *ident, int syslog_level) |
void | log_reopen (void) |
void | log_close_all (void) |
int | log_open (char *filename, int level, enum excl_state excl) |
static void | format (char *buf, int level, const char *place, int e, const char *fmt, int with_timestamp_and_pid) |
static void | PRINTFLIKE (2, 0) |
static void | PRINTFLIKE (1, 0) |
void | gw_backtrace (void **stack_frames, size_t size, int lock) |
void | gw_panic (int err, const char *fmt,...) |
void | error (int err, const char *fmt,...) |
void | warning (int err, const char *fmt,...) |
void | info (int err, const char *fmt,...) |
static int | place_matches (const char *place, const char *pat) |
static int | place_should_be_logged (const char *place) |
static int | place_is_not_logged (const char *place) |
void | debug (const char *place, int err, const char *fmt,...) |
void | log_set_debug_places (const char *places) |
void | log_thread_to (int idx) |
Variables | |
struct { | |
FILE * file | |
int minimum_output_level | |
char filename [FILENAME_MAX+1] | |
enum excl_state exclusive | |
} | logfiles [MAX_LOGFILES] |
static int | num_logfiles = 0 |
static unsigned int | thread_to [(long) THREADTABLE_SIZE] |
static char * | loggable_places [MAX_LOGGABLE_PLACES] |
static int | num_places = 0 |
static RWLock | rwlock |
static int | sysloglevel |
static int | syslogfacility = LOG_DAEMON |
static int | dosyslog = 0 |
#define FUNCTION_GUTS | ( | level, | |
place | |||
) |
Definition at line 544 of file log.c.
Referenced by debug(), error(), gw_panic(), info(), and warning().
#define FUNCTION_GUTS_EXCL | ( | level, | |
place | |||
) |
#define MAX_LOGFILES 4096 |
Definition at line 167 of file log.c.
Referenced by log_open().
#define MAX_LOGGABLE_PLACES (10*1000) |
Definition at line 196 of file log.c.
Referenced by log_set_debug_places().
#define thread_slot | ( | ) | (gwthread_self() % THREADTABLE_SIZE) |
#define THREADTABLE_SIZE 1024 |
Definition at line 181 of file log.c.
Referenced by log_init().
anonymous enum |
|
static |
Definition at line 216 of file log.c.
References file, GW_DEBUG, GW_NON_EXCL, logfiles, and num_logfiles.
Referenced by log_init().
|
static |
void debug | ( | const char * | place, |
int | err, | ||
const char * | fmt, | ||
... | |||
) |
Definition at line 726 of file log.c.
References FUNCTION_GUTS, FUNCTION_GUTS_EXCL, GW_DEBUG, place_is_not_logged(), place_should_be_logged(), thread_slot, and thread_to.
Referenced by abort_elapsed(), accept_thread(), acknowledge_from_rawmessage(), add_push_flag(), add_sar_transaction(), assembly_sar_event(), at2_check_sms_memory(), at2_detect_modem_type(), at2_detect_speed(), at2_extract_line(), at2_open_device(), at2_open_device1(), at2_pdu_decode_deliver_sm(), at2_pdu_decode_report_sm(), at2_pdu_encode(), at2_pdu_extract(), at2_read_delete_message(), at2_read_modems(), at2_read_sms_memory(), at2_send_messages(), at2_send_one_message(), at2_shutdown_cb(), at2_start_cb(), at2_wait_modem_command(), at2_write(), at2_write_ctrlz(), at2_write_line(), at_dial(), bb_reload_smsc_groups(), bb_shutdown(), bearerbox_to_smpp(), bearerbox_to_smsbox(), bearerbox_to_sql(), begin_sar_result(), boxc_receiver(), boxc_route_msg_to_smsc(), boxc_sender(), brunet_receive_sms(), brunet_send_sms(), cant_handle_event(), catenate_msg(), cfg_dump(), cfg_read(), cgw_sender(), cgw_shutdown_cb(), cgw_start_cb(), charset_convert(), check_application_headers(), check_login(), check_multipart(), cimd2_accept_message(), cimd2_get_packet(), cimd2_receive_msg(), cimd2_request(), cimd2_send_response(), cimd2_shutdown_cb(), cimd2_start_cb(), cimd2_stop_cb(), cimd2_submit_msg(), cimd_close(), cimd_open_connection(), cimd_pending_smsmessage(), cimd_receive_msg(), cimd_submit_msg(), clear_sent(), clickatell_receive_sms(), clickatell_send_sms(), client_create(), client_destroy(), client_read_status(), client_reset(), client_session(), client_thread(), concat_handling_check_and_handle(), concat_handling_cleanup(), concat_handling_clear_old_parts(), concat_handling_init(), config_reload(), confirm_push(), conn_pool_get(), connect_tcpip(), continue_sar_result(), convert_content(), cookie_destroy(), create_dlr_from_msg(), data_sm_to_msg(), decode_bearer_indication(), deconvert_content(), delayed_http_reply(), delivery_time_constraints(), dispatch_datagram(), dlr_add(), dlr_find(), dump_area(), dump_pdu(), dump_tpis(), elapse_timer(), emi2_handle_smscreq(), emi2_receiver(), emi2_sender(), emi_open_session(), emi_submit_msg(), emimsg_send(), empty_msg_lists(), event_semantically_valid(), expect_acknowledge(), expire_cookies(), fake_listener(), generic_destroy(), generic_init(), generic_parse_reply(), generic_receive_sms(), generic_send_sms(), get_cookies(), get_data(), get_fields(), get_header_value(), get_matching_translations(), get_ton_npi_value(), get_x_kannel_from_xml(), grp_dump(), gw_accept(), gw_check_check_leaks(), gw_dlopen_get_symbol(), gwthread_cancel(), gwthread_dumpsigmask(), gwthread_join_every(), gwthread_shutdown(), handle_dlr(), handle_erroneous_field_in(), handle_init_event(), handle_internal_event(), handle_method_event(), handle_ota_event(), handle_pdu(), handle_push_event(), handle_reply(), handle_session_event(), handle_split(), handle_submit_sm(), handle_transaction(), have_cookie(), http_accept_request(), http_cgivar_dump(), http_header_dump(), http_queue_thread(), http_use_proxy(), httpsmsc_receiver(), httpsmsc_send_cb(), httpsmsc_shutdown(), indicate_push_abort(), indicate_push_connection(), init_machine_create(), init_machine_destroy(), init_reroute(), init_smppbox(), init_smsbox_routes(), init_smsc_routes(), init_wapbox(), io_thread(), ip_allowed_by_ppg(), kannel_receive_sms(), kannel_send_sms(), log_set_syslog(), machine_create(), machine_destroy(), main(), main_connection_loop(), main_thread(), make_confirmed_push_request(), make_session_request(), make_unit_push_request(), memorybuffer_has_rawmessage(), meta_data_unpack(), method_machine_destroy(), mime_decompile(), mime_entity_body(), mime_entity_dump(), mime_entity_dump_real(), mime_something_to_entity(), msg_dump(), msg_to_bb(), msg_to_pdu(), my_dump(), n_messages_benchmark(), new_thread(), new_thread_cleanup(), normalize_charset(), numhash_create(), obey_request(), octstr_dump_debug(), octstr_dump_short(), octstr_shutdown(), ois_check_incoming(), ois_check_input(), ois_open_receiver(), ois_open_sender(), ois_read_into_buffer(), oisd_accept_message(), oisd_get_packet(), oisd_receive_msg(), oisd_request(), oisd_send_response(), oisd_shutdown_cb(), oisd_start_cb(), oisd_stop_cb(), oisd_submit_msg(), oneuser_dump(), OTAbitmap_create_stream(), pack_into_push_datagram(), pack_known_header(), packet_encode_message(), pap_request_thread(), parachute_start(), parse_address_value(), parse_attr_value(), parse_attribute(), parse_bad_message_response_value(), parse_cimd_to_iso88591(), parse_client_specifier(), parse_constant(), parse_document(), parse_dump(), parse_element(), parse_ext_qualifiers(), parse_global_phone_number(), parse_http_date(), parse_ipv4(), parse_ipv4_fragment(), parse_ipv6(), parse_iso88591_to_emi(), parse_msg_to_rawmessage(), parse_pap_value(), parse_progress_note_value(), parse_push_message_value(), parse_push_response_value(), parse_quality_of_service_value(), parse_response_result_value(), parse_url(), pdu_to_msg(), poller(), post_content_create(), proxy_thread(), push_client_event_handle(), push_client_machine_create(), push_client_machine_destroy(), push_client_machine_find_or_create(), push_machine_create(), push_machine_destroy(), radius_pdu_dump(), radius_pdu_unpack(), read_messages_from_bearerbox(), read_pdu(), receive_push_reply(), receive_reply(), receive_smpp_thread(), reconnect(), report_versions(), request_confirmed_push(), request_push(), request_unit_push(), resend_sar_result(), resp_event_handle(), resp_machine_create(), resp_machine_destroy(), resp_machine_find_or_create(), response(), response_push_connection(), retry_consumer_thread(), return_reply(), route_msg(), run_batch(), run_wapbox(), sema_msg_session_mt(), sema_open(), sema_pending_smsmessage(), sema_reopen(), sema_submit_msg(), send_acknowledge(), send_bad_message_response(), send_message(), send_messages(), send_msg(), send_pdu(), send_post(), send_push_response(), send_request(), send_smpp_thread(), sendsms_thread(), server(), server_thread(), session_machine_create(), session_machine_destroy(), set_any_value(), set_cookies(), shutdown_cb(), sigterm(), smasi_pdu_dump(), smpp_pdu_dump(), smpp_pdu_dump_line(), smpp_pdu_init(), sms_router(), sms_send(), sms_to_client(), smsbox_req_sendota(), smsbox_start(), smsbox_thread(), smsbox_to_bearerbox(), smsc2_cleanup(), smsc2_rout(), smsc_cimd2_create(), smsc_oisd_create(), smsc_soap_create(), smscconn_send(), soap_add_msg_cb(), soap_client_init_query(), soap_create_map(), soap_fetch_xml_data(), soap_listener(), soap_map_xml_data(), soap_msgdata_attribute(), soap_msgdata_deps(), soap_o2o_msgdata_attribute(), soap_parse_dlr(), soap_parse_mo(), soap_read_date(), soap_read_response(), soap_send_loop(), soap_server(), soap_server_start(), soap_server_stop(), soap_shutdown_cb(), soap_start_cb(), soap_stop_cb(), spawn_thread(), start_cb(), start_push(), start_request(), start_wap(), stop_initiator_timer(), store_file_dump(), store_push_data(), store_uuid(), string_to_versioned_number(), sustained_level_benchmark(), tcpip_connect_nb_to_server_with_port(), tcpip_connect_to_server_with_port(), tell_fatal_error(), thread1(), thread2(), tid_in_window(), timer_consumer_thread(), timestamp_to_minutes(), transform_message(), truncated_datagram(), udp_die(), udp_receiver(), udp_sender(), udp_shutdown(), udp_start(), udpc_create(), unpack_datagram(), unpack_wdp_datagram_real(), wait_for_ack(), wap_addr_tuple_dump(), wap_dispatch_datagram(), wap_event_assert(), wap_event_dump(), wap_map_url(), wap_msg_recv(), wap_msg_send(), wap_push_ppg_shutdown(), wapbox_start(), wbmp_create_stream(), wdp_to_wapboxes(), wina_bearer_identifier(), wml_compile(), wrapper_receiver(), wrapper_sender(), wrapper_shutdown(), wrapper_start(), wrapper_stop(), write_request_thread(), wsp_cap_dump(), wsp_cap_dump_list(), wsp_headers_pack(), wsp_headers_unpack(), wsp_pack_integer_string(), wsp_pack_version_value(), wsp_pdu_dump(), wsp_push_client_shutdown(), wsp_session_shutdown(), wtp_event_dump(), wtp_initiator_shutdown(), wtp_pdu_dump(), wtp_resp_shutdown(), wtp_tid_cache_shutdown(), wtp_tid_is_valid(), X28_open_send_link(), xidris_receive_sms(), and xidris_send_sms().
|
static |
Definition at line 145 of file log.c.
References LOG_DAEMON.
Referenced by log_set_syslog_facility().
void error | ( | int | err, |
const char * | fmt, | ||
... | |||
) |
Definition at line 648 of file log.c.
References FUNCTION_GUTS, FUNCTION_GUTS_EXCL, GW_ERROR, thread_slot, and thread_to.
Referenced by add_group(), add_service(), alog_open(), alog_reopen(), at2_detect_modem_type(), at2_device_thread(), at2_init_device(), at2_open_device(), at2_open_device1(), at2_pdu_decode_deliver_sm(), at2_pdu_decode_report_sm(), at2_pdu_encode(), at2_read_buffer(), at2_read_delete_message(), at2_read_pending_incoming_messages(), at2_send_one_message(), at2_set_speed(), at2_wait_modem_command(), at2_write(), at2_write_ctrlz(), at2_write_line(), at_dial(), bb_graceful_restart(), bb_remove_message(), bearerbox_to_smpp(), block_user_signals(), boxc_sent_pop(), brunet_init(), brunet_parse_reply(), brunet_receive_sms(), cant_handle_event(), cfg_read(), cgw_listener(), cgw_open_listening_socket(), cgw_open_send_connection(), cgw_receiver(), cgw_sender(), cgw_wait_command(), change_user(), charset_convert(), check_application_headers(), check_config(), check_data_content_type_header(), check_data_x_wap_application_id_header(), check_do_elements(), check_marks(), check_variable_name(), check_variable_syntax(), cimd2_accept_message(), cimd2_get_packet(), cimd2_login(), cimd2_receive_msg(), cimd2_request(), cimd_close(), cimd_open(), cimd_open_connection(), cimd_pending_smsmessage(), cimd_receive_msg(), cimd_reopen(), cimd_submit_msg(), clickatell_parse_reply(), clickatell_receive_sms(), client_read_status(), client_session(), concat_handling_check_and_handle(), conn_destroy(), conn_flush(), conn_wait(), conn_wrap_fd(), convert_addr_from_pdu(), convert_charset(), copy_until_nul(), create_onetrans(), create_oneuser(), data_sm_to_msg(), date_parse_http(), decode_bearer_indication(), decode_binary_data(), deduce_body_state(), delayed_http_reply(), deliver_to_bearerbox_real(), dispatch(), dispatch_datagram(), dispatch_into_queue(), dlr_spool_add(), dlr_spool_get(), dlr_spool_remove(), do_queue_cleanup(), drop_from_free_ring(), emi2_handle_smscreq(), emi2_listener(), emi2_open_listening_socket(), emi2_receiver(), emi_fill_ucp60_login(), emi_open(), emi_open_session(), emi_receive_msg(), emi_reopen(), emi_submit_msg(), emimsg_send(), expect_acknowledge(), expire_cookies(), fake_listener(), fake_open_connection(), fdset_create_real(), fdset_destroy(), field_count_op(), field_count_reply(), fill_threadinfo(), find_area(), find_session_machine(), for_each_file(), generic_init(), generic_parse_reply(), generic_receive_sms(), get_connection(), get_cookies(), get_data(), get_fields(), get_header_value(), get_msg_filename(), get_variable(), get_x_kannel_from_xml(), gw_accept(), gw_dlopen_get_symbol(), gwthread_poll(), gwthread_pollfd(), handle_connect_reply(), handle_dlr(), handle_get_reply(), handle_init_event(), handle_mo_dcs(), handle_mt_dcs(), handle_operation(), handle_pdu(), handle_reply(), handle_transaction(), have_cookie(), headers_acceptable(), http_header_get(), httpsmsc_send(), httpsmsc_send_cb(), init_batch(), init_configuration(), init_machine_find_or_create(), init_reroute(), init_smsbox(), io_thread(), ip_allowed_by_ppg(), is_executable(), kannel_receive_sms(), log_open(), log_reopen(), main(), main_connection_loop(), main_for_producer_and_consumer(), main_loop(), make_server_socket(), memorybuffer_cut_rawmessage(), meta_data_merge(), meta_data_unpack(), mime_decompile(), msg_to_bb(), msg_to_emimsg(), msg_to_pdu(), msg_unpack_real(), mutex_trylock_real(), mutex_unlock_real(), numhash_add_number(), numhash_create(), obey_request(), obey_request_thread(), octstr_append_from_socket(), octstr_dump_real(), octstr_print(), octstr_read_file(), octstr_read_pipe(), octstr_write_data(), octstr_write_to_socket(), ois_check_deliver_sm_invoke(), ois_check_incoming(), ois_check_input(), ois_decode_deliver_sm_invoke(), ois_decode_submit_sm_result(), ois_deliver_sm_invoke(), ois_deliver_sm_result(), ois_extract_msg_from_buffer(), ois_open(), ois_open_listener(), ois_open_receiver(), ois_open_sender(), ois_reopen(), ois_submit_msg(), ois_submit_sm_invoke(), ois_submit_sm_result(), oisd_accept_message(), oisd_get_packet(), oisd_login(), oisd_receive_msg(), oisd_request(), open_connection(), open_file(), open_receiver(), open_send_connection(), open_transceiver(), open_transmitter(), ota_compile(), pack_challenge(), pack_content_disposition(), pack_content_range(), pack_credentials(), pack_known_header(), pack_md5(), pack_range(), pack_warning(), packet_display_error(), packet_extract(), packet_get_hex_parm(), packet_get_int_parm(), pap_compile(), pap_request_thread(), parachute_start(), parse_array_element(), parse_attr_value(), parse_attribute(), parse_body_part(), parse_cookie(), parse_data_element(), parse_date(), parse_document(), parse_element(), parse_fault_element(), parse_http_date(), parse_integer(), parse_member_element(), parse_methodcall_element(), parse_methodresponse_element(), parse_node(), parse_ota_syncsettings(), parse_param_element(), parse_params_element(), parse_preamble(), parse_rawmessage_to_msg(), parse_request_line(), parse_struct_element(), parse_text(), parse_url(), parse_value_element(), ParseError(), pass_extension_headers(), pass_optional_header(), pdu_to_msg(), poll_callback(), poller(), port_remove(), proxy_thread(), push_client_event_handle(), push_client_machine_find_or_create(), put_data(), radius_pdu_create(), radius_pdu_destroy(), radius_pdu_dump(), radius_pdu_pack(), radius_pdu_unpack(), read_data(), read_from_bearerbox_real(), read_from_box(), read_messages_from_bearerbox(), read_msg(), read_pdu(), read_test_ppg_config(), receive_push_reply(), receive_reply(), receive_request(), receive_smpp_thread(), reconnect(), remove_pid_file(), rename_store(), resp_event_handle(), resp_machine_find_or_create(), restart_box(), return_reply(), run_batch(), run_smppbox(), run_smsbox(), run_sqlbox(), run_wapbox(), sanitize_capabilities(), sema_msg_session_mo(), sema_msg_session_mt(), sema_msglist_push(), sema_open(), sema_pending_smsmessage(), sema_receive_msg(), sema_reopen(), sema_submit_msg(), sema_submit_result(), semaphore_up(), send_acknowledge(), send_msg(), send_post(), send_request(), send_udp(), server_thread(), set_cookies(), setup_official_name(), si_compile(), signal_handler(), sl_compile(), smasi_pdu_destroy(), smasi_pdu_pack(), smasi_thread(), smpp_emu_handle_pdu(), smpp_emu_reader(), smpp_error_to_string(), smpp_pdu_create(), smpp_pdu_destroy(), smpp_pdu_dump(), smpp_pdu_dump_line(), smpp_pdu_init(), smpp_pdu_pack(), smpp_pdu_read_len(), smpp_pdu_unpack(), smpp_to_bearerbox(), sms_charset_processing(), smsbox_req_handle(), smsbox_req_sendota(), smsbox_req_sendsms(), smsbox_sendota_post(), smsbox_sendsms_post(), smsbox_start(), smsbox_thread(), smsbox_xmlrpc_post(), smsc2_add_smsc(), smsc2_reload_lists(), smsc2_remove_smsc(), smsc2_restart_smsc(), smsc2_rout(), smsc2_stop_smsc(), smsc_at2_create(), smsc_cgw_create(), smsc_cimd2_create(), smsc_emi2_create(), smsc_fake_create(), smsc_http_create(), smsc_oisd_create(), smsc_open(), smsc_smasi_create(), smsc_smpp_create(), smsc_soap_create(), smsc_wrapper_create(), smscconn_create(), smscenter_lock(), smscenter_pending_smsmessage(), smscenter_read_into_buffer(), smscenter_receive_msg(), smscenter_submit_msg(), soap_convert_token(), soap_format_xml(), soap_get_index(), soap_listener(), soap_msgdata_attribute(), soap_msgdata_deps(), soap_msgtype_deps(), soap_o2o_msgdata_attribute(), soap_parse_dlr(), soap_parse_mo(), soap_parse_response(), soap_release_dependences(), soap_select_function(), soap_server(), soap_server_start(), soap_start_cb(), soap_xmlnode_get_int64(), soap_xmlnode_get_long(), soap_xmlnode_get_octstr(), socket_set_blocking(), socket_set_nodelay(), spawn_thread(), sql_list(), sql_single(), start_client_threads(), start_fetch(), start_smsc(), store_file_load(), store_init(), store_spool_init(), store_spool_save(), tcpip_connect_nb_to_server_with_port(), tcpip_connect_to_server_with_port(), test_header_combine(), transform_message(), udp_bind(), udp_client_socket(), udp_create_address(), udp_receiver(), udp_recvfrom_flags(), udp_sendto(), udp_start(), udpc_create(), unlink_file(), unlocked_read(), unlocked_write(), unpack_cache_directive(), unpack_datagram(), unpack_parameter(), unpack_range_value(), unpack_warning_value(), unpack_wdp_datagram_real(), update_push_data_with_attribute(), update_table(), update_tables(), url_result_thread(), wait_for_ack(), wait_for_client(), wait_for_connections(), wap_msg_recv(), wap_msg_send(), wap_push_ppg_pushuser_authenticate(), wap_push_ppg_pushuser_client_phone_number_acceptable(), wapbox_start(), wbmp_create(), wbmp_create_stream(), wml_compile(), write_data(), write_to_bearerbox_real(), write_to_socket(), ws_asm_linearize(), ws_bc_decode(), ws_bc_encode(), ws_encode_buffer(), ws_pragma_use(), wsp_cap_pack_list(), wsp_cap_unpack_list(), wsp_convert_http_status_to_wsp_status(), wsp_pack_retry_after(), wtp_event_dump(), wtp_event_is_for_responder(), X28_close_send_link(), X28_data_read(), X28_data_send(), X28_open_data_link(), X28_open_send_link(), X28_reopen_data_link(), xidris_init(), xidris_parse_reply(), xidris_receive_sms(), xml_error(), xmlrpc_call_print(), xmlrpc_doc_add_value(), xmlrpc_doc_print(), xmlrpc_doc_send(), xmlrpc_get_faultcode(), xmlrpc_get_faultstring(), xmlrpc_response_add_param(), xmlrpc_response_get_faultcode(), xmlrpc_response_get_faultstring(), xmlrpc_scalar_create(), xmlrpc_scalar_get_content(), xmlrpc_value_get_content(), xmlrpc_value_set_content(), and xmlrpc_value_set_type().
|
static |
Definition at line 430 of file log.c.
References FORMAT_SIZE, gw_gmtime(), gw_localtime(), gwthread_self(), and gwthread_self_ids().
void gw_backtrace | ( | void ** | stack_frames, |
size_t | size, | ||
int | lock | ||
) |
Definition at line 599 of file log.c.
References gw_native_free(), and size.
Referenced by fatal_handler(), and gw_panic().
void gw_panic | ( | int | err, |
const char * | fmt, | ||
... | |||
) |
void info | ( | int | err, |
const char * | fmt, | ||
... | |||
) |
Definition at line 672 of file log.c.
References FUNCTION_GUTS, FUNCTION_GUTS_EXCL, GW_INFO, thread_slot, and thread_to.
Referenced by accept_boxc(), accept_smpp(), alog_open(), at2_close_device(), at2_detect_modem_type(), at2_detect_speed(), at2_device_thread(), at2_init_device(), at2_login_device(), at2_open_device1(), at2_read_modems(), at2_read_pending_incoming_messages(), at2_set_speed(), at_dial(), authorise_username(), bb_graceful_restart(), bb_smscconn_receive(), bearerbox_to_smpp(), cgw_handle_op(), cgw_listener(), cgw_open_send_connection(), cgw_read_op(), cgw_receiver(), cgw_send_loop(), cgw_wait_command(), cgwop_add(), check_login(), cimd2_accept_message(), cimd2_login(), cimd2_logout(), client(), client_session(), client_thread(), config_reload(), conn_config_ssl(), connect_to_bearerbox_real(), create_onetrans(), deliver_unit_push(), delivery_time_constraints(), dlr_flush(), dlr_init(), emi2_handle_smscreq(), emi2_idleprocessing(), emi2_idletimeout_handling(), emi2_listener(), emi2_receiver(), emi2_send_loop(), emi_close_ip(), emi_open_session(), emi_submit_msg(), empty_msg_lists(), eq_log(), expect_acknowledge(), fake_listener(), find_hb(), get_and_set_debugs(), get_cookies(), get_data(), handle_operation(), handle_pdu(), handle_push_message(), handle_submit_sm(), heartbeat_start(), heartbeat_stop(), heartbeat_thread(), help(), http_open_port_if(), httpadmin_run(), httpsmsc_receiver(), init_batch(), init_machine_find_or_create(), init_reroute(), init_smppbox(), init_smsbox(), init_sqlbox(), init_wapbox(), log_open(), log_set_log_level(), log_thread_to(), main(), main_connection_loop(), mutex_destroy(), numhash_create(), obey_request_thread(), octstr_dump_real(), oisd_accept_message(), oisd_login(), open_send_connection(), ota_pack_message(), pap_request_thread(), parachute_sig_handler(), parachute_start(), parse_address(), parse_document(), producer(), proxy_thread(), push_thread(), radius_acct_init(), radius_acct_shutdown(), read_from_box(), read_messages_from_bearerbox(), reconnect(), reload_bool(), reload_int(), resp_machine_find_or_create(), run_batch(), run_requests(), run_smppbox(), sema_decode_msg(), sema_msg_session_mo(), sema_msg_session_mt(), sema_msglist_pop(), sema_msglist_push(), sema_submit_msg(), send_file(), send_message(), send_smpp_thread(), sendsms_thread(), server(), smppboxc_run(), smsbox_req_handle(), smsbox_req_sendota(), smsbox_sendota_post(), smsbox_start(), smsbox_thread(), smsc2_graceful_restart(), smsc2_restart_smsc(), smsc2_rout(), smsc2_start(), smsc2_status(), smsc2_stop_smsc(), smsc_at2_create(), smsc_cgw_create(), smsc_emi2_create(), smsc_http_create(), smsc_soap_create(), smscconn_create(), start_fetch(), start_request(), store_file_load(), store_spool_load(), udp_addwdp_from_client(), udp_receiver(), udp_sender(), udp_start(), update_table(), update_tables(), wait_for_client(), wap_msg_recv(), wapbox_start(), wsp_headers_unpack(), wtp_event_dump(), wtp_tid_is_valid(), X28_open_data_link(), and X28_open_send_link().
void log_close_all | ( | void | ) |
Definition at line 341 of file log.c.
References closelog(), dosyslog, file, filename, gw_rwlock_unlock(), gw_rwlock_wrlock(), logfiles, num_logfiles, and rwlock.
Referenced by get_and_set_debugs(), log_shutdown(), and main().
void log_init | ( | void | ) |
Definition at line 230 of file log.c.
References add_stderr(), gw_rwlock_init_static(), rwlock, thread_to, and THREADTABLE_SIZE.
Referenced by gwlib_init().
int log_open | ( | char * | filename, |
int | level, | ||
enum excl_state | excl | ||
) |
Definition at line 375 of file log.c.
References error(), filename, gw_rwlock_unlock(), gw_rwlock_wrlock(), info(), logfiles, MAX_LOGFILES, num_logfiles, and rwlock.
Referenced by get_and_set_debugs(), init_bearerbox(), init_smppbox(), init_smsbox(), init_sqlbox(), init_wapbox(), main(), and smscconn_create().
void log_reopen | ( | void | ) |
Definition at line 297 of file log.c.
References error(), file, filename, found, gw_rwlock_unlock(), gw_rwlock_wrlock(), logfiles, num_logfiles, and rwlock.
Referenced by main(), and signal_handler().
void log_set_debug_places | ( | const char * | places | ) |
Definition at line 746 of file log.c.
References loggable_places, MAX_LOGGABLE_PLACES, and num_places.
Referenced by get_and_set_debugs().
void log_set_log_level | ( | enum output_level | level | ) |
Definition at line 265 of file log.c.
References file, filename, info(), logfiles, and num_logfiles.
Referenced by config_reload(), and httpd_loglevel().
void log_set_output_level | ( | enum output_level | level | ) |
Definition at line 253 of file log.c.
References file, logfiles, and num_logfiles.
Referenced by get_and_set_debugs(), and main().
void log_set_syslog | ( | const char * | ident, |
int | syslog_level | ||
) |
Definition at line 284 of file log.c.
References debug(), dosyslog, LOG_PID, openlog(), syslogfacility, and sysloglevel.
Referenced by get_and_set_debugs(), init_bearerbox(), init_smsbox(), init_wapbox(), and remove_pid_file().
void log_set_syslog_facility | ( | char * | facility | ) |
Definition at line 278 of file log.c.
References decode(), and syslogfacility.
Referenced by init_bearerbox(), init_smsbox(), and init_wapbox().
void log_shutdown | ( | void | ) |
Definition at line 245 of file log.c.
References gw_rwlock_destroy(), log_close_all(), and rwlock.
Referenced by gwlib_shutdown().
void log_thread_to | ( | int | idx | ) |
Definition at line 759 of file log.c.
References filename, info(), logfiles, minimum_output_level, num_logfiles, thread_slot, thread_to, and warning().
Referenced by at2_device_thread(), cgw_listener(), cgw_sender(), emi2_listener(), emi2_sender(), fake_listener(), httpsmsc_receiver(), httpsmsc_send_cb(), httpsmsc_sender(), io_thread(), smasi_thread(), wrapper_receiver(), and wrapper_sender().
|
static |
|
static |
Definition at line 711 of file log.c.
References loggable_places, num_places, and place_matches().
Referenced by debug().
|
static |
Definition at line 684 of file log.c.
Referenced by place_is_not_logged(), and place_should_be_logged().
|
static |
Definition at line 696 of file log.c.
References loggable_places, num_places, and place_matches().
Referenced by debug().
|
static |
|
static |
Definition at line 501 of file log.c.
References dosyslog, GW_DEBUG, GW_ERROR, GW_INFO, GW_PANIC, GW_WARNING, LOG_ALERT, LOG_DEBUG, LOG_ERR, LOG_INFO, LOG_WARNING, syslog(), and sysloglevel.
|
static |
void warning | ( | int | err, |
const char * | fmt, | ||
... | |||
) |
Definition at line 660 of file log.c.
References FUNCTION_GUTS, FUNCTION_GUTS_EXCL, GW_WARNING, thread_slot, and thread_to.
Referenced by add_item(), add_msisdn(), add_x_wap_tod(), alog_open(), at2_open_device1(), authorise_username(), bb_reload_smsc_groups(), bb_smscconn_receive_internal(), bb_smscconn_send_failed(), bearerbox_to_smpp(), boxc_receiver(), cant_handle_event(), cfg_get_bool(), cgw_check_acks(), cgw_listener(), charset_convert(), charset_gsm_to_utf8(), charset_utf8_to_gsm(), check_config(), check_reversible(), check_variable_syntax(), cimd2_close_socket(), cimd2_destroy(), cimd2_get_packet(), cimd2_handle_request(), cimd2_login(), cimd2_receive_msg(), cimd2_request(), cimd2_send_alive(), cimd_submit_msg(), client_session(), concat_handling_check_and_handle(), concat_handling_clear_old_parts(), config_reload(), conn_read_withlen(), convert_addr_from_pdu(), convert_cimd2_to_gsm(), convert_si_to_sic(), convert_sl_to_slc(), convert_wml_to_wmlc(), convert_wmlscript_to_wmlscriptc(), copy_until_assign(), copy_until_coma(), copy_until_nul(), create_onetrans(), create_oneuser(), date_format_http(), deliver_sms_to_queue(), destroy_methodmachines(), destroy_pushmachines(), dispatch_datagram(), dlr_add(), dlr_find(), dlr_init(), do_queue_cleanup(), emi2_idleprocessing(), emi2_listener(), emi2_send_loop(), empty_msg_lists(), fake_listener(), fdset_destroy(), fdset_listen(), fdset_unregister(), fill_message(), generic_init(), generic_parse_reply(), generic_receive_sms(), get_fields(), get_mime_boundary(), get_pattern(), get_x_kannel_from_headers(), gw_check_area_size(), gwthread_dumpsigmask(), gwthread_join(), gwthread_join_every(), gwthread_shutdown(), gwthread_sleep(), gwthread_sleep_micro(), handle_dlr(), handle_method_event(), handle_operation(), handle_pdu(), handle_push_event(), handle_push_message(), handle_split(), headers_acceptable(), heartbeat_stop(), http_header_quoted_string_len(), httpsmsc_send_cb(), init_bearerbox(), init_smppbox(), io_thread(), ip_allowed_by_ppg(), ip_allowed_by_user(), log_thread_to(), main(), main_for_producer_and_consumer(), main_loop(), main_thread(), mime_decompile(), mime_parse(), msg_to_bb(), normalize_charset(), numhash_create(), obey_request_thread(), octstr_base64_to_binary(), octstr_dump_real(), octstr_url_decode(), ois_check_input(), ois_close(), ois_disconnect(), ois_disconnect_all(), ois_pending_smsmessage(), ois_submit_msg(), oisd_accept_message(), oisd_close_socket(), oisd_destroy(), oisd_get_packet(), oisd_login(), oisd_receive_msg(), oisd_request(), oisd_send_delivery_request(), ota_pack_push_headers(), pack_accept_encoding(), pack_challenge(), pack_content_disposition(), pack_content_range(), pack_credentials(), pack_range(), pack_warning(), packet_add_parm(), packet_check(), packet_check_can_receive(), packet_check_header(), packet_check_parameter(), packet_encode_message(), packet_extract(), pap_compile(), pap_request_thread(), parse_address(), parse_attribute(), parse_bearer(), parse_code(), parse_date(), parse_delivery_method(), parse_document(), parse_element(), parse_network(), parse_node(), parse_ota_syncsettings(), parse_priority(), parse_requirement(), parse_state(), ParseWarning(), pass_data_headers(), port_add(), proxy_thread(), proxy_unpack_credentials(), read_available(), read_messages_from_bearerbox(), receive_push_reply(), retry_consumer_thread(), return_reply(), route_incoming_to_boxc(), route_msg(), sanitize_capabilities(), send_file(), send_post(), send_request(), server_thread(), set_dlr_mask(), signal_handler(), skip_until_after_colon(), smasi_pdu_create(), smasi_pdu_dump(), smasi_pdu_unpack(), smpp_emu(), sms_receive(), smsbox_req_handle(), smsbox_req_sendsms(), smsc2_add_smsc(), smsc2_restart_smsc(), smsc2_rout(), smsc2_start(), smsc_cimd2_create(), smsc_emi2_create(), smsc_http_create(), smsc_smpp_create(), smscconn_create(), smscconn_send(), soap_parse_response(), split_headers(), store_file_load(), store_to_dict(), timer_consumer_thread(), timers_shutdown(), transform_message(), udp_receiver(), unpack_accept_language_general_form(), unpack_cache_directive(), unpack_challenge(), unpack_content_range(), unpack_credentials(), unpack_datagram(), unpack_disposition(), unpack_encoding_version(), unpack_field_name(), unpack_optional_q_value(), unpack_parameter(), unpack_range_value(), unpack_retry_after(), unpack_warning_value(), unpack_wdp_datagram_real(), update_table(), update_tables(), url_pattern(), wait_for_ack(), wap_dispatch_datagram(), wdp_to_wapboxes(), write_data(), wsp_cap_unpack_list(), wsp_headers_pack(), wsp_headers_unpack(), wsp_pack_application_header(), wsp_pack_date(), wsp_pack_integer_string(), wsp_pack_separate_content_type(), wsp_pdu_unpack(), wsp_unpack_accept_charset_general_form(), wsp_unpack_accept_general_form(), wsp_unpack_app_header(), wsp_unpack_date_value(), wsp_unpack_integer_value(), wsp_unpack_well_known_field(), wtp_pdu_create(), wtp_pdu_destroy(), wtp_pdu_unpack(), wtp_unpack_wdp_datagram(), X28_open_send_link(), and xmlrpc_doc_destroy().
|
static |
Definition at line 211 of file log.c.
Referenced by log_close_all(), log_set_syslog(), and PRINTFLIKE().
enum excl_state exclusive |
FILE* file |
Definition at line 169 of file log.c.
Referenced by add_stderr(), at2_read_modems(), cfg_get_real(), cfg_read(), create_onetrans(), expand_file(), FileSize(), http_header_find_first_real(), log_close_all(), log_reopen(), log_set_log_level(), log_set_output_level(), main(), msg_create_real(), msg_unpack_real(), mutex_lock_real(), mutex_trylock_real(), mutex_unlock_real(), octstr_copy_real(), octstr_create_from_data_real(), octstr_create_real(), octstr_duplicate_real(), octstr_get_cstr_real(), ReadBinary(), unlock_in_real(), unlock_out_real(), wap_event_create_real(), and write_pid_file().
char filename[FILENAME_MAX+1] |
Definition at line 171 of file log.c.
Referenced by cfg_create(), cfg_read(), cfgloc_create(), dispatch(), dlr_spool_add(), dlr_spool_get(), dlr_spool_remove(), for_each_file(), get_msg_surrogate(), gw_check_calloc(), gw_check_claim_area(), gw_check_malloc(), gw_check_realloc(), gw_check_strdup(), is_executable(), log_close_all(), log_open(), log_reopen(), log_set_log_level(), log_thread_to(), main(), octstr_read_file(), record_allocation(), seems_valid_real(), send_file(), status_cb(), store_spool_save(), and unlink_file().
struct { ... } logfiles[MAX_LOGFILES] |
Referenced by add_stderr(), log_close_all(), log_open(), log_reopen(), log_set_log_level(), log_set_output_level(), and log_thread_to().
|
static |
Definition at line 197 of file log.c.
Referenced by log_set_debug_places(), place_is_not_logged(), and place_should_be_logged().
int minimum_output_level |
Definition at line 170 of file log.c.
Referenced by log_thread_to().
|
static |
Definition at line 174 of file log.c.
Referenced by add_stderr(), log_close_all(), log_open(), log_reopen(), log_set_log_level(), log_set_output_level(), and log_thread_to().
|
static |
Definition at line 198 of file log.c.
Referenced by log_set_debug_places(), place_is_not_logged(), and place_should_be_logged().
|
static |
Definition at line 204 of file log.c.
Referenced by log_close_all(), log_init(), log_open(), log_reopen(), and log_shutdown().
|
static |
Definition at line 210 of file log.c.
Referenced by log_set_syslog(), and log_set_syslog_facility().
|
static |
Definition at line 209 of file log.c.
Referenced by log_set_syslog(), and PRINTFLIKE().
|
static |
Definition at line 182 of file log.c.
Referenced by debug(), error(), info(), log_init(), log_thread_to(), and warning().