Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Friends

Log Class Reference

This object exists to provide a namespace for the logging system. More...

#include <Log.h>

Collaboration diagram for Log:
Collaboration graph
[legend]

Public Types

enum  ReturnCodeFlags {
  LOG_OK = 1, SKIP = 2, AGGR = 4, FAIL = 8,
  FULL = 16
}
enum  LoggingMode { LOG_MODE_NONE = 0, LOG_MODE_ERRORS, LOG_MODE_TRANSACTIONS, LOG_MODE_FULL }
enum  InitFlags { FIELDS_INITIALIZED = 1, FULLY_INITIALIZED = 2 }
enum  ConfigFlags { NO_REMOTE_MANAGEMENT = 1, STANDALONE_COLLATOR = 2, LOGCAT = 4 }
enum  CollationMode {
  NO_COLLATION = 0, COLLATION_HOST, SEND_STD_FMTS, SEND_NON_XML_CUSTOM_FMTS,
  SEND_STD_AND_NON_XML_CUSTOM_FMTS, N_COLLATION_MODES
}
enum  RollingEnabledValues {
  NO_ROLLING = 0, ROLL_ON_TIME_ONLY, ROLL_ON_SIZE_ONLY, ROLL_ON_TIME_OR_SIZE,
  ROLL_ON_TIME_AND_SIZE, INVALID_ROLLING_VALUE
}
enum  { MIN_ROLLING_INTERVAL_SEC = 60, MAX_ROLLING_INTERVAL_SEC = 86400 }

Public Member Functions

 Log ()

Static Public Member Functions

static void init (int configFlags=0)
static void init_fields ()
static inkcoreapi bool transaction_logging_enabled ()
static inkcoreapi bool error_logging_enabled ()
static inkcoreapi int access (LogAccess *lad)
static inkcoreapi int va_error (const char *format, va_list ap)
static inkcoreapi int error (const char *format,...) TS_PRINTFLIKE(1
static void * preproc_thread_main (void *args)
static void * flush_thread_main (void *args)
static void * collate_thread_main (void *args)
static LogObjectmatch_logobject (LogBufferHeader *header)
static void change_configuration ()
static int handle_logging_mode_change (const char *name, RecDataT data_type, RecData data, void *cookie)

Static Public Attributes

static inkcoreapi int static
inkcoreapi LogObject
error_log = NULL
static LogConfigconfig = NULL
static LogFieldList global_field_list
static InkHashTablefield_symbol_hash = 0
static LogFormatglobal_scrap_format = NULL
static LogObjectglobal_scrap_object = NULL
static LoggingMode logging_mode = LOG_MODE_NONE
static EventNotifypreproc_notify
static EventNotifyflush_notify
static InkAtomicListflush_data_list
static EventNotify collate_notify
static ink_thread collate_thread
static int collation_preproc_threads
static int collation_accept_file_descriptor
static int collation_port

Friends

void RegressionTest_LogObjectManager_Transfer (RegressionTest *, int, int *)

Detailed Description

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.


Member Enumeration Documentation

anonymous enum
Enumerator:
MIN_ROLLING_INTERVAL_SEC 
MAX_ROLLING_INTERVAL_SEC 

Definition at line 407 of file Log.h.

Enumerator:
NO_COLLATION 
COLLATION_HOST 
SEND_STD_FMTS 
SEND_NON_XML_CUSTOM_FMTS 
SEND_STD_AND_NON_XML_CUSTOM_FMTS 
N_COLLATION_MODES 

Definition at line 387 of file Log.h.

Enumerator:
NO_REMOTE_MANAGEMENT 
STANDALONE_COLLATOR 
LOGCAT 

Definition at line 380 of file Log.h.

Enumerator:
FIELDS_INITIALIZED 
FULLY_INITIALIZED 

Definition at line 374 of file Log.h.

Enumerator:
LOG_MODE_NONE 
LOG_MODE_ERRORS 
LOG_MODE_TRANSACTIONS 
LOG_MODE_FULL 

Definition at line 366 of file Log.h.

Enumerator:
LOG_OK 
SKIP 
AGGR 
FAIL 
FULL 

Definition at line 357 of file Log.h.

Enumerator:
NO_ROLLING 
ROLL_ON_TIME_ONLY 
ROLL_ON_SIZE_ONLY 
ROLL_ON_TIME_OR_SIZE 
ROLL_ON_TIME_AND_SIZE 
INVALID_ROLLING_VALUE 

Definition at line 397 of file Log.h.


Constructor & Destructor Documentation

Log::Log (  ) 

Member Function Documentation

int Log::access ( LogAccess lad  )  [static]
void Log::change_configuration (  )  [static]
void * Log::collate_thread_main ( void *  args  )  [static]
int Log::error ( const char *  format,
  ... 
) [static]
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]
int Log::handle_logging_mode_change ( const char *  name,
RecDataT  data_type,
RecData  data,
void *  cookie 
) [static]

Definition at line 889 of file Log.cc.

References Debug.

Referenced by init().

void Log::init ( int  configFlags = 0  )  [static]
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]
void * Log::preproc_thread_main ( void *  args  )  [static]
static inkcoreapi bool Log::transaction_logging_enabled (  )  [inline, static]
int Log::va_error ( const char *  format,
va_list  ap 
) [static]

Friends And Related Function Documentation

void RegressionTest_LogObjectManager_Transfer ( RegressionTest ,
int  ,
int *   
) [friend]

Field Documentation

Definition at line 449 of file Log.h.

Definition at line 450 of file Log.h.

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().

Definition at line 451 of file Log.h.

Referenced by init().

LogConfig * Log::config = NULL [static]
inkcoreapi LogObject * Log::error_log = NULL [static]

Definition at line 428 of file Log.h.

Referenced by LogConfig::init(), and va_error().

Definition at line 436 of file Log.h.

Referenced by LogFieldList::find_by_symbol(), and init_fields().

Definition at line 444 of file Log.h.

Referenced by LogFile::preproc_and_try_delete(), and LogFile::write_ascii_logbuffer3().

Definition at line 433 of file Log.h.

Referenced by init_fields(), and LogFormat::parse_symbol_string().

Definition at line 437 of file Log.h.

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 442 of file Log.h.


The documentation for this class was generated from the following files: