diff options
author | unknown <rburnett@build.mysql.com> | 2004-08-19 17:56:32 +0200 |
---|---|---|
committer | unknown <rburnett@build.mysql.com> | 2004-08-19 17:56:32 +0200 |
commit | 87bce8540c7c38cb88ce8743b8efcb0a51f53bfe (patch) | |
tree | dc86eb2a0ba9c9a67da1e9197b8bf2d4ca70403a /sql/log.cc | |
parent | 4736e7d4bdcde029923518826db33da6a38a6c01 (diff) | |
download | mariadb-git-87bce8540c7c38cb88ce8743b8efcb0a51f53bfe.tar.gz |
Bug #4466 Nothing in .err when mysql service ends because of malformed my.ini options
mysqld.cc:
Changed LOGLEVEL enum to loglevel
mysql_priv.h, log.cc:
Changed LOGLEVEL to loglevel. Removed startup_ from some of the DBUG_ENTER macros. Removed the print_msg_to_log function as it was unused.
my_getopt.c, my_getopt.h:
Renamed LOGLEVEL to loglevel to match coding standards
include/my_getopt.h:
Renamed LOGLEVEL to loglevel to match coding standards
mysys/my_getopt.c:
Renamed LOGLEVEL to loglevel to match coding standards
sql/log.cc:
Changed LOGLEVEL to loglevel. Removed startup_ from some of the DBUG_ENTER macros. Removed the print_msg_to_log function as it was unused.
sql/mysql_priv.h:
Changed LOGLEVEL to loglevel. Removed startup_ from some of the DBUG_ENTER macros. Removed the print_msg_to_log function as it was unused.
sql/mysqld.cc:
Changed LOGLEVEL enum to loglevel
Diffstat (limited to 'sql/log.cc')
-rw-r--r-- | sql/log.cc | 45 |
1 files changed, 13 insertions, 32 deletions
diff --git a/sql/log.cc b/sql/log.cc index a487de250db..9743fdf8a37 100644 --- a/sql/log.cc +++ b/sql/log.cc @@ -1716,13 +1716,13 @@ static bool test_if_number(register const char *str, } /* test_if_number */ -void print_buffer_to_file( enum LOGLEVEL level, const char *buffer ) +void print_buffer_to_file( enum loglevel level, const char *buffer ) { time_t skr; struct tm tm_tmp; struct tm *start; - DBUG_ENTER("startup_print_buffer_to_log"); + DBUG_ENTER("print_buffer_to_log"); VOID(pthread_mutex_lock(&LOCK_error_log)); @@ -1802,35 +1802,16 @@ bool flush_error_log() return result; } -/** - * prints a printf style message to the error log and, under NT, to the Windows event log. - * @param event_type type of even to log. - * @param timestamp true to add a timestamp to the entry, false otherwise. - * @param format The printf style format of the message - * @param ... values for the message - * @return void -*/ -void print_msg_to_log( LOGLEVEL level, const char *format, ... ) -{ - va_list args; - - DBUG_ENTER("startup_print_msg_to_log"); - - va_start( args, format ); - vprint_msg_to_log( level, format, args ); - va_end( args ); - - DBUG_VOID_RETURN; -} - #ifdef __NT__ -void print_buffer_to_nt_eventlog( enum LOGLEVEL level, char *buff, int buffLen ) +void print_buffer_to_nt_eventlog( enum loglevel level, char *buff, int buffLen ) { HANDLE event; char *buffptr; LPCSTR *buffmsgptr; + DBUG_ENTER( "print_buffer_to_nt_eventlog" ); + buffptr = buff; if (strlen(buff) > (uint)(buffLen-4)) { @@ -1885,11 +1866,11 @@ void print_buffer_to_nt_eventlog( enum LOGLEVEL level, char *buff, int buffLen ) RETURN VALUES void */ -void vprint_msg_to_log(enum LOGLEVEL level, const char *format, va_list args) +void vprint_msg_to_log(enum loglevel level, const char *format, va_list args) { char buff[1024]; - DBUG_ENTER("startup_vprint_msg_to_log"); + DBUG_ENTER("vprint_msg_to_log"); my_vsnprintf( buff, sizeof(buff)-5, format, args ); @@ -1909,11 +1890,11 @@ void vprint_msg_to_log(enum LOGLEVEL level, const char *format, va_list args) void sql_print_error( const char *format, ... ) { - DBUG_ENTER( "startup_sql_print_error" ); + DBUG_ENTER( "sql_print_error" ); va_list args; va_start( args, format ); - print_msg_to_log( ERROR_LEVEL, format, args ); + vprint_msg_to_log( ERROR_LEVEL, format, args ); va_end( args ); DBUG_VOID_RETURN; @@ -1921,11 +1902,11 @@ void sql_print_error( const char *format, ... ) void sql_print_warning( const char *format, ... ) { - DBUG_ENTER( "startup_sql_print_warning" ); + DBUG_ENTER( "sql_print_warning" ); va_list args; va_start( args, format ); - print_msg_to_log( WARNING_LEVEL, format, args ); + vprint_msg_to_log( WARNING_LEVEL, format, args ); va_end( args ); DBUG_VOID_RETURN; @@ -1933,11 +1914,11 @@ void sql_print_warning( const char *format, ... ) void sql_print_information( const char *format, ... ) { - DBUG_ENTER( "startup_sql_print_information" ); + DBUG_ENTER( "sql_print_information" ); va_list args; va_start( args, format ); - print_msg_to_log( INFORMATION_LEVEL, format, args ); + vprint_msg_to_log( INFORMATION_LEVEL, format, args ); va_end( args ); DBUG_VOID_RETURN; |