This object exists to provide a namespace for the logging system. More...
#include <Log.h>
This object exists to provide a namespace for the logging system.
It contains all data types and global variables relevant to the logging system. You can't actually create a Log object, so all members are static.
Definition at line 353 of file Log.h.
anonymous enum |
enum Log::CollationMode |
enum Log::ConfigFlags |
enum Log::InitFlags |
enum Log::LoggingMode |
enum Log::ReturnCodeFlags |
Log::Log | ( | ) |
int Log::access | ( | LogAccess * | lad | ) | [static] |
Definition at line 1054 of file Log.cc.
References config, Debug, LogAccess::init(), ink_assert, LogObjectManager::log(), LogConfig::log_object_manager, log_stat_event_log_access_skip_stat, Thread::mutex, RecIncrRawStat(), this_ethread(), ProxyMutex::thread_holding, and transaction_logging_enabled().
Referenced by HttpBodyTemplate::build_instantiated_buffer(), HttpSM::do_redirect(), ICPPeerReadCont::PeerReadStateMachine(), and HttpSM::update_stats().
void Log::change_configuration | ( | ) | [static] |
Definition at line 102 of file Log.cc.
References LogObjectManager::_APImutex, Debug, LogObjectManager::flush_all_objects(), LogConfig::init(), ink_assert, ink_mutex_acquire(), ink_mutex_release(), log_configid, LogConfig::log_object_manager, and LogConfig::read_configuration_variables().
void * Log::collate_thread_main | ( | void * | args | ) | [static] |
Definition at line 1342 of file Log.cc.
References LogSock::accept(), LogSock::authorized_client(), LogSock::check_connections(), LogSock::close(), collation_port, LogConfig::collation_port, LogConfig::collation_secret, Debug, global_scrap_object, ink_assert, LogSock::listen(), EventNotify::lock(), LogUtils::LOG_ALARM_ERROR, LOG_SEGMENT_VERSION, LogSock::LS_CONST_CLUSTER_MAX_MACHINES, LogObject::m_format, LogUtils::manager_alarm(), match_logobject(), LogFormat::name(), Note, LogSock::pending_connect(), LogSock::pending_message_any(), LogSock::read_alloc(), EventNotify::unlock(), LogBufferHeader::version, EventNotify::wait(), and Warning.
Referenced by LoggingCollateContinuation::mainEvent().
int Log::error | ( | const char * | format, | |
... | ||||
) | [static] |
Definition at line 1114 of file Log.cc.
References va_error().
Referenced by HttpTransact::build_error_response(), HttpSM::do_redirect(), HttpBodyFactory::fabricate_with_old_api(), HttpTransact::handle_trace_and_options_requests(), HttpTransact::HandleBlindTunnel(), HttpSM::mark_host_failure(), HttpTransact::OSDNSLookup(), HttpTransact::retry_server_connection_not_open(), HttpSM::state_request_wait_for_transform_read(), and HttpSM::update_stats().
static inkcoreapi bool Log::error_logging_enabled | ( | ) | [inline, static] |
Definition at line 421 of file Log.h.
References LOG_MODE_ERRORS, LOG_MODE_FULL, and logging_mode.
Referenced by LogConfig::init().
void * Log::flush_thread_main | ( | void * | args | ) | [static] |
Definition at line 1217 of file Log.cc.
References LogBufferHeader::byte_count, LogFile::check_fd(), Debug, Error, flush_data_list, LogFile::get_name(), SLL< C, L >::head, LogBuffer::header(), ink_atomiclist_popall(), ink_get_hrtime(), ink_release_assert, LogFile::is_open(), EventNotify::lock(), LOG_FILE_ASCII, LOG_FILE_BINARY, LOG_FILE_PIPE, log_stat_bytes_lost_before_written_to_disk_stat, log_stat_bytes_written_to_disk_stat, LogFile::m_bytes_written, LogFlushData::m_data, LogFile::m_fd, LogFile::m_file_format, LogFlushData::m_len, LogFlushData::m_logfile, Thread::mutex, PERIODIC_TASKS_INTERVAL, SLL< C, L >::pop(), SLL< C, L >::push(), RecIncrRawStat(), this_thread(), ProxyMutex::thread_holding, EventNotify::unlock(), EventNotify::wait(), and Warning.
Referenced by LoggingFlushContinuation::mainEvent().
void Log::init | ( | int | configFlags = 0 |
) | [static] |
Definition at line 898 of file Log.cc.
References collation_accept_file_descriptor, LogConfig::collation_mode, LogConfig::collation_port, collation_port, LogConfig::collation_preproc_threads, collation_preproc_threads, config, Debug, handle_logging_mode_change(), LogConfig::init(), init_fields(), ink_assert, log_configid, LOG_MODE_FULL, log_stat_count, log_stat_log_files_open_stat, LOGCAT, logging_mode, NO_FD, NO_REMOTE_MANAGEMENT, LogConfig::read_configuration_variables(), REC_ConfigReadInteger(), REC_RegisterConfigUpdateFunc, RecAllocateRawStatBlock(), RecSetRawStatCount(), RecSetRawStatSum(), register_stat_callbacks(), STANDALONE_COLLATOR, and Warning.
Referenced by main().
void Log::init_fields | ( | ) | [static] |
Definition at line 324 of file Log.cc.
References LogFieldList::add(), LogField::dINT, field_symbol_hash, FIELDS_INITIALIZED, global_field_list, ink_hash_table_create(), ink_hash_table_insert(), InkHashTableKeyType_String, LogField::IP, LOG_CACHE_WRITE_COMPLETE, LOG_CACHE_WRITE_ERROR, LOG_CACHE_WRITE_LOCK_ABORTED, LOG_CACHE_WRITE_LOCK_MISSED, LOG_CACHE_WRITE_NONE, LOG_ENTRY_HTTP, LOG_ENTRY_ICP, LOG_FINISH_FIN, LOG_FINISH_INTR, LOG_FINISH_TIMEOUT, make_ptr(), LogAccess::marshal_cache_resp_content_len(), LogAccess::marshal_cache_resp_header_len(), LogAccess::marshal_cache_resp_http_version(), LogAccess::marshal_cache_resp_status_code(), LogAccess::marshal_cache_result_code(), LogAccess::marshal_cache_write_code(), LogAccess::marshal_cache_write_transform_code(), LogAccess::marshal_client_auth_user_name(), LogAccess::marshal_client_finish_status_code(), LogAccess::marshal_client_host_ip(), LogAccess::marshal_client_host_port(), LogAccess::marshal_client_req_body_len(), LogAccess::marshal_client_req_header_len(), LogAccess::marshal_client_req_http_method(), LogAccess::marshal_client_req_http_version(), LogAccess::marshal_client_req_text(), LogAccess::marshal_client_req_timestamp_sec(), LogAccess::marshal_client_req_unmapped_url_canon(), LogAccess::marshal_client_req_unmapped_url_host(), LogAccess::marshal_client_req_unmapped_url_path(), LogAccess::marshal_client_req_url(), LogAccess::marshal_client_req_url_canon(), LogAccess::marshal_client_req_url_path(), LogAccess::marshal_client_req_url_scheme(), LogAccess::marshal_client_retry_after_time(), LogAccess::marshal_entry_type(), LogAccess::marshal_file_size(), LogAccess::marshal_plugin_identity_id(), LogAccess::marshal_plugin_identity_tag(), LogAccess::marshal_proxy_finish_status_code(), LogAccess::marshal_proxy_hierarchy_route(), LogAccess::marshal_proxy_host_ip(), LogAccess::marshal_proxy_host_name(), LogAccess::marshal_proxy_req_body_len(), LogAccess::marshal_proxy_req_header_len(), LogAccess::marshal_proxy_req_server_ip(), LogAccess::marshal_proxy_req_server_name(), LogAccess::marshal_proxy_resp_content_len(), LogAccess::marshal_proxy_resp_content_type(), LogAccess::marshal_proxy_resp_header_len(), LogAccess::marshal_proxy_resp_squid_len(), LogAccess::marshal_proxy_resp_status_code(), LogAccess::marshal_server_host_ip(), LogAccess::marshal_server_host_name(), LogAccess::marshal_server_resp_content_len(), LogAccess::marshal_server_resp_header_len(), LogAccess::marshal_server_resp_http_version(), LogAccess::marshal_server_resp_status_code(), LogAccess::marshal_transfer_time_ms(), LogAccess::marshal_transfer_time_s(), N_LOG_CACHE_WRITE_TYPES, N_LOG_ENTRY_TYPES, N_LOG_FINISH_CODE_TYPES, LogAccess::set_client_req_unmapped_url_canon(), LogAccess::set_client_req_unmapped_url_host(), LogAccess::set_client_req_unmapped_url_path(), LogAccess::set_client_req_url(), LogAccess::set_client_req_url_canon(), LogAccess::set_client_req_url_path(), LogField::sINT, SQUID_HIER_DEFAULT_PARENT, SQUID_HIER_DIRECT, SQUID_HIER_EMPTY, SQUID_HIER_FIREWALL_IP_DIRECT, SQUID_HIER_FIRST_PARENT_MISS, SQUID_HIER_FIRST_UP_PARENT, SQUID_HIER_INVALID_ASSIGNED_CODE, SQUID_HIER_INVALID_CODE, SQUID_HIER_LOCAL_IP_DIRECT, SQUID_HIER_NO_DIRECT_FAIL, SQUID_HIER_NO_PARENT_DIRECT, SQUID_HIER_NONE, SQUID_HIER_PARENT_HIT, SQUID_HIER_PARENT_UDP_HIT_OBJ, SQUID_HIER_PASSTHROUGH_PARENT, SQUID_HIER_SIBLING_HIT, SQUID_HIER_SIBLING_UDP_HIT_OBJ, SQUID_HIER_SINGLE_PARENT, SQUID_HIER_SOURCE_FASTEST, SQUID_HIER_SSL_PARENT_MISS, SQUID_HIER_TIMEOUT_DEFAULT_PARENT, SQUID_HIER_TIMEOUT_DIRECT, SQUID_HIER_TIMEOUT_FIREWALL_IP_DIRECT, SQUID_HIER_TIMEOUT_FIRST_PARENT_MISS, SQUID_HIER_TIMEOUT_FIRST_UP_PARENT, SQUID_HIER_TIMEOUT_LOCAL_IP_DIRECT, SQUID_HIER_TIMEOUT_NO_DIRECT_FAIL, SQUID_HIER_TIMEOUT_NO_PARENT_DIRECT, SQUID_HIER_TIMEOUT_PARENT_HIT, SQUID_HIER_TIMEOUT_PARENT_UDP_HIT_OBJ, SQUID_HIER_TIMEOUT_PASSTHROUGH_PARENT, SQUID_HIER_TIMEOUT_SIBLING_HIT, SQUID_HIER_TIMEOUT_SIBLING_UDP_HIT_OBJ, SQUID_HIER_TIMEOUT_SINGLE_PARENT, SQUID_HIER_TIMEOUT_SOURCE_FASTEST, SQUID_HIER_TIMEOUT_TIMEOUT_SSL_PARENT_MISS, SQUID_LOG_EMPTY, SQUID_LOG_ERR_CANNOT_FETCH, SQUID_LOG_ERR_CLIENT_ABORT, SQUID_LOG_ERR_CONNECT_FAIL, SQUID_LOG_ERR_DISK_IO, SQUID_LOG_ERR_DNS_FAIL, SQUID_LOG_ERR_FUTURE_1, SQUID_LOG_ERR_INVALID_REQ, SQUID_LOG_ERR_INVALID_URL, SQUID_LOG_ERR_LIFETIME_EXP, SQUID_LOG_ERR_NO_CLIENTS_BIG_OBJ, SQUID_LOG_ERR_NO_FDS, SQUID_LOG_ERR_NO_RELAY, SQUID_LOG_ERR_NOT_IMPLEMENTED, SQUID_LOG_ERR_PROXY_DENIED, SQUID_LOG_ERR_READ_ERROR, SQUID_LOG_ERR_READ_TIMEOUT, SQUID_LOG_ERR_UNKNOWN, SQUID_LOG_ERR_UNSUP_REQ, SQUID_LOG_ERR_WEBFETCH_DETECTED, SQUID_LOG_ERR_ZERO_SIZE_OBJECT, SQUID_LOG_TCP_CLIENT_REFRESH, SQUID_LOG_TCP_DENIED, SQUID_LOG_TCP_DISK_HIT, SQUID_LOG_TCP_EXPIRED_MISS, SQUID_LOG_TCP_FUTURE_2, SQUID_LOG_TCP_HIT, SQUID_LOG_TCP_HIT_REDIRECT, SQUID_LOG_TCP_HIT_X_REDIRECT, SQUID_LOG_TCP_IMS_HIT, SQUID_LOG_TCP_IMS_MISS, SQUID_LOG_TCP_MEM_HIT, SQUID_LOG_TCP_MISS, SQUID_LOG_TCP_MISS_REDIRECT, SQUID_LOG_TCP_MISS_X_REDIRECT, SQUID_LOG_TCP_REF_FAIL_HIT, SQUID_LOG_TCP_REFRESH_HIT, SQUID_LOG_TCP_REFRESH_MISS, SQUID_LOG_TCP_SWAPFAIL, SQUID_LOG_TCP_WEBFETCH_MISS, SQUID_LOG_UDP_DENIED, SQUID_LOG_UDP_FUTURE_1, SQUID_LOG_UDP_FUTURE_2, SQUID_LOG_UDP_HIT, SQUID_LOG_UDP_HIT_OBJ, SQUID_LOG_UDP_INVALID, SQUID_LOG_UDP_MISS, SQUID_LOG_UDP_RELOADING, SQUID_LOG_UDP_WEAK_HIT, LogField::STRING, LogAccess::unmarshal_cache_code(), LogAccess::unmarshal_cache_write_code(), LogAccess::unmarshal_entry_type(), LogAccess::unmarshal_finish_status(), LogAccess::unmarshal_hierarchy(), LogAccess::unmarshal_http_status(), LogAccess::unmarshal_http_text(), LogAccess::unmarshal_http_version(), LogAccess::unmarshal_int_to_str(), LogAccess::unmarshal_int_to_str_hex(), LogAccess::unmarshal_ip_to_hex(), LogAccess::unmarshal_ip_to_str(), LogAccess::unmarshal_str(), and LogAccess::unmarshal_ttmsf().
Referenced by init().
LogObject * Log::match_logobject | ( | LogBufferHeader * | header | ) | [static] |
Definition at line 1458 of file Log.cc.
References LogObject::BINARY, LogBufferHeader::fmt_fieldlist(), LogBufferHeader::fmt_printf(), LogObjectManager::get_object_with_signature(), LOG_FILE_BINARY, LOG_FILE_PIPE, LogBufferHeader::log_filename(), LogBufferHeader::log_object_flags, LogConfig::log_object_manager, LogBufferHeader::log_object_signature, LogObject::set_remote_flag(), LogFormat::valid(), and LogObject::WRITES_TO_PIPE.
Referenced by collate_thread_main().
void * Log::preproc_thread_main | ( | void * | args | ) | [static] |
Definition at line 1180 of file Log.cc.
References Debug, likely, EventNotify::lock(), log_configid, LogConfig::log_object_manager, LogObjectManager::preproc_buffers(), EventNotify::unlock(), and EventNotify::wait().
Referenced by LoggingPreprocContinuation::mainEvent().
static inkcoreapi bool Log::transaction_logging_enabled | ( | ) | [inline, static] |
Definition at line 416 of file Log.h.
References LOG_MODE_FULL, LOG_MODE_TRANSACTIONS, and logging_mode.
Referenced by access(), HttpSM::do_redirect(), LogConfig::init(), and HttpSM::update_stats().
int Log::va_error | ( | const char * | format, | |
va_list | ap | |||
) | [static] |
Definition at line 1127 of file Log.cc.
References AGGR, error_log, FAIL, FULL, ink_assert, ink_release_assert, LOG_OK, log_stat_event_log_error_aggr_stat, log_stat_event_log_error_fail_stat, log_stat_event_log_error_full_stat, log_stat_event_log_error_ok_stat, log_stat_event_log_error_skip_stat, Thread::mutex, RecIncrRawStat(), SKIP, this_ethread(), ProxyMutex::thread_holding, and LogObject::va_log().
void RegressionTest_LogObjectManager_Transfer | ( | RegressionTest * | , | |
int | , | |||
int * | ||||
) | [friend] |
EventNotify Log::collate_notify [static] |
ink_thread Log::collate_thread [static] |
int Log::collation_accept_file_descriptor [static] |
Definition at line 452 of file Log.h.
Referenced by init(), and LogCollationAccept::~LogCollationAccept().
int Log::collation_port [static] |
Definition at line 453 of file Log.h.
Referenced by collate_thread_main(), and init().
int Log::collation_preproc_threads [static] |
LogConfig * Log::config = NULL [static] |
Definition at line 432 of file Log.h.
Referenced by access(), LogFile::check_fd(), init(), LogObject::log(), LogBuffer::LogBuffer(), LogObject::LogObject(), LogBuffer::max_entry_bytes(), LogFile::open_file(), LogHost::orphan_write_and_try_delete(), LogConfig::reconfigure(), LogConfig::reconfigure_mgmt_variables(), LogCollationClientSM::send(), LogHost::set_name_or_ipstr(), TSTextLogObjectCreate(), TSTextLogObjectDestroy(), and LogFile::write_ascii_logbuffer().
inkcoreapi LogObject * Log::error_log = NULL [static] |
Definition at line 428 of file Log.h.
Referenced by LogConfig::init(), and va_error().
InkHashTable * Log::field_symbol_hash = 0 [static] |
Definition at line 436 of file Log.h.
Referenced by LogFieldList::find_by_symbol(), and init_fields().
InkAtomicList * Log::flush_data_list [static] |
Definition at line 445 of file Log.h.
Referenced by flush_thread_main(), LogFile::preproc_and_try_delete(), and LogFile::write_ascii_logbuffer3().
EventNotify * Log::flush_notify [static] |
Definition at line 444 of file Log.h.
Referenced by LogFile::preproc_and_try_delete(), and LogFile::write_ascii_logbuffer3().
LogFieldList Log::global_field_list [static] |
Definition at line 433 of file Log.h.
Referenced by init_fields(), and LogFormat::parse_symbol_string().
LogFormat * Log::global_scrap_format = NULL [static] |
LogObject * Log::global_scrap_object = NULL [static] |
Definition at line 438 of file Log.h.
Referenced by collate_thread_main().
Log::LoggingMode Log::logging_mode = LOG_MODE_NONE [static] |
Definition at line 439 of file Log.h.
Referenced by error_logging_enabled(), init(), LogConfig::read_configuration_variables(), and transaction_logging_enabled().
EventNotify * Log::preproc_notify [static] |