Enumerations | |
enum | AlarmType { LOG_ALARM_ERROR = 0, LOG_ALARM_WARNING, LOG_ALARM_N_TYPES } |
Functions | |
static long | timestamp () |
int | timestamp_to_str (long timestamp, char *buf, int size) |
char * | timestamp_to_netscape_str (long timestamp) |
char * | timestamp_to_date_str (long timestamp) |
char * | timestamp_to_time_str (long timestamp) |
unsigned | ip_from_host (char *host) |
void | manager_alarm (AlarmType alarm_type, const char *msg,...) TS_PRINTFLIKE(2 |
void void | strip_trailing_newline (char *buf) |
char * | escapify_url (Arena *arena, char *url, size_t len_in, int *len_out, char *dst=NULL, size_t dst_size=0, const unsigned char *map=NULL) |
char * | int64_to_str (char *buf, unsigned int buf_size, int64_t val, unsigned int *total_chars, unsigned int req_width=0, char pad_char='0') |
void | remove_content_type_attributes (char *type_str, int *type_len) |
int | timestamp_to_hex_str (unsigned timestamp, char *str, size_t len, size_t *n_chars=0) |
int | seconds_to_next_roll (time_t time_now, int rolling_offset, int rolling_interval) |
int | file_is_writeable (const char *full_filename, off_t *size_bytes=0, bool *has_size_limit=0, uint64_t *current_size_limit_bytes=0) |
enum LogUtils::AlarmType |
Definition at line 33 of file LogUtils.h.
char * LogUtils::escapify_url | ( | Arena * | arena, | |
char * | url, | |||
size_t | len_in, | |||
int * | len_out, | |||
char * | dst = NULL , |
|||
size_t | dst_size = 0 , |
|||
const unsigned char * | map = NULL | |||
) |
Definition at line 273 of file LogUtils.cc.
References ink_strlcpy(), Arena::str_alloc(), and to.
Referenced by LogAccessHttp::init(), LogAccessICP::marshal_client_req_url_canon(), LogAccessHttp::marshal_http_header_field_escapify(), and TSStringPercentEncode().
int LogUtils::file_is_writeable | ( | const char * | full_filename, | |
off_t * | size_bytes = 0 , |
|||
bool * | has_size_limit = 0 , |
|||
uint64_t * | current_size_limit_bytes = 0 | |||
) |
Definition at line 486 of file LogUtils.cc.
References memcpy.
char* LogUtils::int64_to_str | ( | char * | buf, | |
unsigned int | buf_size, | |||
int64_t | val, | |||
unsigned int * | total_chars, | |||
unsigned int | req_width = 0 , |
|||
char | pad_char = '0' | |||
) |
Definition at line 43 of file ink_hrtime.cc.
References memcpy.
Referenced by LogAccess::marshal_record(), and squid_timestamp_to_buf().
unsigned LogUtils::ip_from_host | ( | char * | host | ) |
void LogUtils::manager_alarm | ( | LogUtils::AlarmType | alarm_type, | |
const char * | msg, | |||
... | ||||
) |
Definition at line 212 of file LogUtils.cc.
References ink_assert, LOG_ALARM_ERROR, LOG_ALARM_N_TYPES, LOG_ALARM_WARNING, LOG_MAX_FORMATTED_LINE, REC_SIGNAL_LOGGING_ERROR, REC_SIGNAL_LOGGING_WARNING, and RecSignalManager().
Referenced by LogFile::check_fd(), Log::collate_thread_main(), and LogConfig::update_space_used().
void LogUtils::remove_content_type_attributes | ( | char * | type_str, | |
int * | type_len | |||
) |
Definition at line 388 of file LogUtils.cc.
Referenced by LogAccessHttp::init(), and LogAccessICP::marshal_proxy_resp_content_type().
int LogUtils::seconds_to_next_roll | ( | time_t | time_now, | |
int | rolling_offset, | |||
int | rolling_interval | |||
) |
Definition at line 456 of file LogUtils.cc.
References ink_localtime_r().
Referenced by LogObject::roll_files().
void LogUtils::strip_trailing_newline | ( | char * | buf | ) |
Definition at line 251 of file LogUtils.cc.
static long LogUtils::timestamp | ( | ) | [inline, static] |
Definition at line 40 of file LogUtils.h.
Referenced by LogObject::log(), LogBuffer::LogBuffer(), LogFile::open_file(), resolve_logfield_string(), LogObject::roll_files(), CongestionEntry::sprint(), LogBuffer::update_header_data(), and LogObject::va_log().
char * LogUtils::timestamp_to_date_str | ( | long | timestamp | ) |
Definition at line 145 of file LogUtils.cc.
References ink_localtime_r().
Referenced by LogBuffer::resolve_custom_entry().
int LogUtils::timestamp_to_hex_str | ( | unsigned | timestamp, | |
char * | str, | |||
size_t | len, | |||
size_t * | n_chars = 0 | |||
) |
Definition at line 417 of file LogUtils.cc.
Referenced by LogFieldAliasTimeHex::asString().
char * LogUtils::timestamp_to_netscape_str | ( | long | timestamp | ) |
Definition at line 86 of file LogUtils.cc.
References ink_localtime_r(), and ink_strlcat().
Referenced by LogBuffer::resolve_custom_entry().
int LogUtils::timestamp_to_str | ( | long | timestamp, | |
char * | buf, | |||
int | size | |||
) |
Definition at line 65 of file LogUtils.cc.
References ink_localtime_r().
Referenced by LogFile::roll(), and LogObject::va_log().
char * LogUtils::timestamp_to_time_str | ( | long | timestamp | ) |
Definition at line 177 of file LogUtils.cc.
References ink_localtime_r().
Referenced by LogBuffer::resolve_custom_entry().