CUBRID Engine  latest
event_log.c File Reference
#include "event_log.h"
#include "config.h"
#include "critical_section.h"
#include "dbtype.h"
#include "error_manager.h"
#include "environment_variable.h"
#include "log_impl.h"
#include "query_executor.h"
#include "object_primitive.h"
#include "porting.h"
#include "system_parameter.h"
#include "xasl_cache.h"
#include <assert.h>
#include <stdio.h>
#include <sys/time.h>
Include dependency graph for event_log.c:

Go to the source code of this file.

Macros

#define EVENT_LOG_FILE_DIR   "server"
 
#define EVENT_LOG_FILE_SUFFIX   ".event"
 

Functions

static FILE * event_file_open (const char *path)
 
static FILE * event_file_backup (FILE *fp, const char *path)
 
static void event_log_print_client_ids_info (CLIENTIDS *client_info, int indent)
 
void event_log_init (const char *db_name)
 
void event_log_final (void)
 
FILE * event_log_start (THREAD_ENTRY *thread_p, const char *event_name)
 
void event_log_end (THREAD_ENTRY *thread_p)
 
void event_log_print_client_info (int tran_index, int indent)
 
void event_log_sql_string (THREAD_ENTRY *thread_p, FILE *log_fp, XASL_ID *xasl_id, int indent)
 
void event_log_bind_values (THREAD_ENTRY *thread_p, FILE *log_fp, int tran_index, int bind_index)
 
void event_log_log_flush_thr_wait (THREAD_ENTRY *thread_p, int flush_count, clientids *client_info, int flush_time, int flush_wait_time, int writer_time)
 

Variables

static FILE * event_Fp = NULL
 
static char event_log_file_path [PATH_MAX]
 

Macro Definition Documentation

#define EVENT_LOG_FILE_DIR   "server"

Definition at line 55 of file event_log.c.

Referenced by event_log_init().

#define EVENT_LOG_FILE_SUFFIX   ".event"

Definition at line 56 of file event_log.c.

Referenced by event_file_open(), and event_log_init().

Function Documentation

static FILE * event_file_backup ( FILE *  fp,
const char *  path 
)
static

Definition at line 188 of file event_log.c.

References assert, and NULL.

Referenced by event_file_open(), and event_log_start().

Here is the caller graph for this function:

static FILE * event_file_open ( const char *  path)
static
void event_log_bind_values ( THREAD_ENTRY thread_p,
FILE *  log_fp,
int  tran_index,
int  bind_index 
)
void event_log_end ( THREAD_ENTRY thread_p)
void event_log_final ( void  )

Definition at line 208 of file event_log.c.

References event_Fp, and NULL.

Referenced by boot_server_all_finalize().

Here is the caller graph for this function:

void event_log_init ( const char *  db_name)
void event_log_log_flush_thr_wait ( THREAD_ENTRY thread_p,
int  flush_count,
clientids client_info,
int  flush_time,
int  flush_wait_time,
int  writer_time 
)

Definition at line 446 of file event_log.c.

References event_log_end(), event_log_print_client_ids_info(), event_log_start(), log_fp, and NULL.

Referenced by logpb_flush_all_append_pages().

Here is the caller graph for this function:

static void event_log_print_client_ids_info ( CLIENTIDS client_info,
int  indent 
)
static

Definition at line 308 of file event_log.c.

References clientids::client_type, event_Fp, clientids::get_db_user(), clientids::get_host_name(), clientids::get_program_name(), NULL, and clientids::process_id.

Referenced by event_log_log_flush_thr_wait().

Here is the caller graph for this function:

void event_log_print_client_info ( int  tran_index,
int  indent 
)
void event_log_sql_string ( THREAD_ENTRY thread_p,
FILE *  log_fp,
XASL_ID xasl_id,
int  indent 
)

Variable Documentation

char event_log_file_path[PATH_MAX]
static

Definition at line 59 of file event_log.c.

Referenced by event_log_init(), and event_log_start().