Enumerations | Functions

LogUtils Namespace Reference

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)

Enumeration Type Documentation

Enumerator:
LOG_ALARM_ERROR 
LOG_ALARM_WARNING 
LOG_ALARM_N_TYPES 

Definition at line 33 of file LogUtils.h.


Function Documentation

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 
)
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,
  ... 
)
void LogUtils::remove_content_type_attributes ( char *  type_str,
int *  type_len 
)
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]
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().