CUBRID Engine  latest
cas_sql_log2.c File Reference
#include <stdio.h>
#include <time.h>
#include <stdarg.h>
#include <string.h>
#include <unistd.h>
#include <sys/time.h>
#include "cas_common.h"
#include "dbi.h"
#include "cas_execute.h"
#include "cas_sql_log2.h"
#include "broker_filename.h"
#include "broker_util.h"
Include dependency graph for cas_sql_log2.c:

Go to the source code of this file.

Functions

void sql_log2_init (char *br_name, int index, int sql_log_value, bool log_reuse_flag)
 
char * sql_log2_get_filename ()
 
void sql_log2_dup_stdout ()
 
void sql_log2_restore_stdout ()
 
void sql_log2_end (bool reset_filename_flag)
 
void sql_log2_flush ()
 
void sql_log2_write (const char *fmt,...)
 
void sql_log2_append_file (char *file_name)
 

Variables

static char sql_log2_file [256] = ""
 
static FILE * sql_log2_fp = NULL
 
static int log_count = 0
 
static int saved_fd1
 

Function Documentation

void sql_log2_append_file ( char *  file_name)

Definition at line 165 of file cas_sql_log2.c.

References NULL, and sql_log2_fp.

void sql_log2_dup_stdout ( void  )

Definition at line 94 of file cas_sql_log2.c.

References saved_fd1, and sql_log2_fp.

void sql_log2_end ( bool  reset_filename_flag)

Definition at line 118 of file cas_sql_log2.c.

References NULL, sql_log2_file, and sql_log2_fp.

Referenced by cas_main(), fn_end_tran(), process_request(), and shard_cas_main().

Here is the caller graph for this function:

void sql_log2_flush ( void  )

Definition at line 132 of file cas_sql_log2.c.

char* sql_log2_get_filename ( void  )

Definition at line 84 of file cas_sql_log2.c.

References NULL, and sql_log2_file.

Referenced by cas_main(), and shard_cas_main().

Here is the caller graph for this function:

void sql_log2_init ( char *  br_name,
int  index,
int  sql_log_value,
bool  log_reuse_flag 
)

Definition at line 53 of file cas_sql_log2.c.

References BROKER_PATH_MAX, dirname(), FID_SQL_LOG2_DIR, FID_SQL_LOG_DIR, get_cubrid_file(), log_count, NULL, sql_log2_file, and sql_log2_fp.

Referenced by cas_main(), fn_end_tran(), process_request(), and shard_cas_main().

Here is the caller graph for this function:

void sql_log2_restore_stdout ( void  )

Definition at line 106 of file cas_sql_log2.c.

References saved_fd1, and sql_log2_fp.

void sql_log2_write ( const char *  fmt,
  ... 
)

Definition at line 140 of file cas_sql_log2.c.

References NULL, and sql_log2_fp.

Variable Documentation

int log_count = 0
static

Definition at line 48 of file cas_sql_log2.c.

Referenced by sql_log2_init().

int saved_fd1
static

Definition at line 49 of file cas_sql_log2.c.

Referenced by sql_log2_dup_stdout(), and sql_log2_restore_stdout().

char sql_log2_file[256] = ""
static

Definition at line 46 of file cas_sql_log2.c.

Referenced by sql_log2_end(), sql_log2_get_filename(), and sql_log2_init().

FILE* sql_log2_fp = NULL
static