#include <LogObject.h>
Public Types | |
enum | { NO_FILENAME_CONFLICTS = 0, ERROR_ACCESSING_LOG_FILE, ERROR_DETERMINING_FILE_INFO, CANNOT_SOLVE_FILENAME_CONFLICTS, ERROR_DOING_FILESYSTEM_CHECKS } |
Public Member Functions | |
LogObjectManager () | |
~LogObjectManager () | |
int | manage_object (LogObject *logObject, int maxConflicts=99) |
int | manage_api_object (LogObject *logObject, int maxConflicts=99) |
bool | unmanage_api_object (LogObject *logObject) |
void | flush_all_objects () |
LogObject * | get_object_with_signature (uint64_t signature) |
void | check_buffer_expiration (long time_now) |
unsigned | roll_files (long time_now) |
int | log (LogAccess *lad) |
void | display (FILE *str=stdout) |
void | add_filter_to_all (LogFilter *filter) |
LogObject * | find_by_format_name (const char *name) const |
size_t | preproc_buffers (int idx) |
void | open_local_pipes () |
void | transfer_objects (LogObjectManager &mgr) |
bool | has_api_objects () const |
unsigned | get_num_objects () const |
unsigned | get_num_collation_clients () const |
Data Fields | |
ink_mutex * | _APImutex |
Definition at line 300 of file LogObject.h.
anonymous enum |
NO_FILENAME_CONFLICTS | |
ERROR_ACCESSING_LOG_FILE | |
ERROR_DETERMINING_FILE_INFO | |
CANNOT_SOLVE_FILENAME_CONFLICTS | |
ERROR_DOING_FILESYSTEM_CHECKS |
Definition at line 305 of file LogObject.h.
LogObjectManager::LogObjectManager | ( | ) |
Definition at line 888 of file LogObject.cc.
References _APImutex, and ink_mutex_init().
LogObjectManager::~LogObjectManager | ( | ) |
Definition at line 894 of file LogObject.cc.
References _APImutex, Vec< C, A, S >::length(), and REF_COUNT_OBJ_REFCOUNT_DEC.
void LogObjectManager::add_filter_to_all | ( | LogFilter * | filter | ) |
Definition at line 1196 of file LogObject.cc.
References Vec< C, A, S >::length().
void LogObjectManager::check_buffer_expiration | ( | long | time_now | ) |
Definition at line 1138 of file LogObject.cc.
References ACQUIRE_API_MUTEX, Vec< C, A, S >::length(), and RELEASE_API_MUTEX.
void LogObjectManager::display | ( | FILE * | str = stdout |
) |
Definition at line 1300 of file LogObject.cc.
References ACQUIRE_API_MUTEX, Vec< C, A, S >::length(), and RELEASE_API_MUTEX.
Referenced by LogConfig::display(), LogConfig::setup_log_objects(), and transfer_objects().
LogObject * LogObjectManager::find_by_format_name | ( | const char * | name | ) | const |
Definition at line 1314 of file LogObject.cc.
References LogFormat::id_from_name(), and Vec< C, A, S >::length().
Referenced by LogConfig::init().
void LogObjectManager::flush_all_objects | ( | ) |
Definition at line 1383 of file LogObject.cc.
References ACQUIRE_API_MUTEX, Vec< C, A, S >::length(), and RELEASE_API_MUTEX.
Referenced by Log::change_configuration().
unsigned LogObjectManager::get_num_collation_clients | ( | ) | const |
Definition at line 1325 of file LogObject.cc.
References Vec< C, A, S >::length().
Referenced by LogConfig::init().
unsigned LogObjectManager::get_num_objects | ( | ) | const [inline] |
Definition at line 366 of file LogObject.h.
References Vec< C, A, S >::length().
Referenced by LogConfig::display(), LogConfig::init(), and LogObjectManager_Transfer().
LogObject * LogObjectManager::get_object_with_signature | ( | uint64_t | signature | ) |
Definition at line 1124 of file LogObject.cc.
References LogObject::get_signature(), and Vec< C, A, S >::length().
Referenced by Log::match_logobject().
bool LogObjectManager::has_api_objects | ( | ) | const [inline] |
Definition at line 365 of file LogObject.h.
References Vec< C, A, S >::length().
Referenced by LogConfig::has_api_objects().
int LogObjectManager::log | ( | LogAccess * | lad | ) |
Definition at line 1338 of file LogObject.cc.
References Log::AGGR, Log::FAIL, Log::FULL, ink_release_assert, Vec< C, A, S >::length(), likely, Log::LOG_OK, log_rsb, log_stat_event_log_access_aggr_stat, log_stat_event_log_access_fail_stat, log_stat_event_log_access_full_stat, log_stat_event_log_access_ok_stat, log_stat_event_log_access_skip_stat, Thread::mutex, RecIncrRawStat(), Log::SKIP, this_thread(), ProxyMutex::thread_holding, and unlikely.
Referenced by Log::access().
int LogObjectManager::manage_api_object | ( | LogObject * | logObject, | |
int | maxConflicts = 99 | |||
) | [inline] |
Definition at line 342 of file LogObject.h.
Referenced by transfer_objects(), and TSTextLogObjectCreate().
int LogObjectManager::manage_object | ( | LogObject * | logObject, | |
int | maxConflicts = 99 | |||
) | [inline] |
Definition at line 338 of file LogObject.h.
Referenced by LogObjectManager_Transfer().
void LogObjectManager::open_local_pipes | ( | ) |
Definition at line 1205 of file LogObject.cc.
References LogObject::is_collation_client(), Vec< C, A, S >::length(), LogObject::m_logFile, and LogObject::writes_to_pipe().
Referenced by LogConfig::setup_log_objects().
size_t LogObjectManager::preproc_buffers | ( | int | idx | ) |
Definition at line 1154 of file LogObject.cc.
References ACQUIRE_API_MUTEX, Vec< C, A, S >::length(), and RELEASE_API_MUTEX.
Referenced by Log::preproc_thread_main().
unsigned LogObjectManager::roll_files | ( | long | time_now | ) |
Definition at line 1280 of file LogObject.cc.
References ACQUIRE_API_MUTEX, Vec< C, A, S >::length(), and RELEASE_API_MUTEX.
void LogObjectManager::transfer_objects | ( | LogObjectManager & | mgr | ) |
Definition at line 1220 of file LogObject.cc.
References Debug, display(), LogObject::get_base_filename(), is_debug_tag_set, Vec< C, A, S >::length(), manage_api_object(), REF_COUNT_OBJ_REFCOUNT_DEC, and REF_COUNT_OBJ_REFCOUNT_INC.
Referenced by LogObjectManager_Transfer(), and LogConfig::transfer_objects().
bool LogObjectManager::unmanage_api_object | ( | LogObject * | logObject | ) |
Definition at line 1175 of file LogObject.cc.
References ACQUIRE_API_MUTEX, LogObject::force_new_buffer(), HRTIME_SECONDS, Vec< C, A, S >::in(), new_Derefer(), RELEASE_API_MUTEX, and Vec< C, A, S >::remove().
Definition at line 322 of file LogObject.h.
Referenced by Log::change_configuration(), LogObjectManager(), and ~LogObjectManager().