diff options
author | unknown <anozdrin/alik@booka.> | 2006-11-21 17:47:14 +0300 |
---|---|---|
committer | unknown <anozdrin/alik@booka.> | 2006-11-21 17:47:14 +0300 |
commit | 7c35c3d5e66b350b59fb0aaef4d1cc97f332bea7 (patch) | |
tree | 013e928c88c019dc5bfaa9bd7713f68f41037ac5 /server-tools/instance-manager/log.h | |
parent | cbfff7304d60f56853bb1312dbe6fe42ebbeffee (diff) | |
download | mariadb-git-7c35c3d5e66b350b59fb0aaef4d1cc97f332bea7.tar.gz |
Polishing:
- change some return types from int to bool;
- add [ERROR] tag to log_error() output;
- add [INFO] tag to log_info() output;
- change log messages to be more consistent.
server-tools/instance-manager/IMService.cpp:
Log polishing.
server-tools/instance-manager/commands.cc:
Log polishing.
server-tools/instance-manager/commands.h:
Eliminate warnings.
server-tools/instance-manager/instance.cc:
Log polishing.
server-tools/instance-manager/instance_map.cc:
Log polishing.
server-tools/instance-manager/instance_options.cc:
1) Log polishing.
2) Change int-return type to bool.
server-tools/instance-manager/instance_options.h:
Change int-return type to bool.
server-tools/instance-manager/listener.cc:
Log polishing.
server-tools/instance-manager/log.cc:
Log polishing.
server-tools/instance-manager/log.h:
Log polishing.
server-tools/instance-manager/manager.cc:
Log polishing.
server-tools/instance-manager/mysql_connection.cc:
Log polishing.
server-tools/instance-manager/mysql_connection.h:
Change int-return type to bool.
server-tools/instance-manager/mysqlmanager.cc:
Log polishing.
server-tools/instance-manager/priv.cc:
Log polishing.
server-tools/instance-manager/thread_registry.cc:
1. Print pthread_t as (unsigned long), not as (signed long)
to avoid negative identifiers in output.
2. Print thread id after it will be initialized, not before.
server-tools/instance-manager/user_map.cc:
Log polishing.
Diffstat (limited to 'server-tools/instance-manager/log.h')
-rw-r--r-- | server-tools/instance-manager/log.h | 38 |
1 files changed, 8 insertions, 30 deletions
diff --git a/server-tools/instance-manager/log.h b/server-tools/instance-manager/log.h index 825d7515513..9c47dbe04f5 100644 --- a/server-tools/instance-manager/log.h +++ b/server-tools/instance-manager/log.h @@ -19,20 +19,23 @@ /* Logging facilities. - Two logging streams are supported: error log and info log. Additionally - libdbug may be used for debug information output. + Two logging streams are supported: error log and info log. + Additionally libdbug may be used for debug information output. + ANSI C buffered I/O is used to perform logging. + Logging is performed via stdout/stder, so one can reopen them to point to - ordinary files. To initialize loggin environment log_init() must be called. + ordinary files. To initialize logging environment log_init() must be called. Rationale: - no MYSQL_LOG as it has BIN mode, and not easy to fetch from sql_class.h - no constructors/desctructors to make logging available all the time - Function names are subject to change. */ -/* Precede error message with date and time and print it to the stdout */ +void log_init(); + + void log_info(const char *format, ...) #ifdef __GNUC__ __attribute__ ((format(printf, 1, 2))) @@ -40,7 +43,6 @@ void log_info(const char *format, ...) ; -/* Precede error message with date and time and print it to the stderr */ void log_error(const char *format, ...) #ifdef __GNUC__ __attribute__ ((format (printf, 1, 2))) @@ -48,30 +50,6 @@ void log_error(const char *format, ...) ; -/* - Now this is simple catchouts for printf (no date/time is logged), to be - able to replace underlying streams in future. -*/ - -void print_info(const char *format, ...) -#ifdef __GNUC__ - __attribute__ ((format (printf, 1, 2))) -#endif - ; - - -void print_error(const char *format, ...) -#ifdef __GNUC__ - __attribute__ ((format (printf, 1, 2))) -#endif - ; - -/* initialize logs */ -void log_init(); - - -/* print information to the error log and eixt(1) */ - void die(const char *format, ...) #ifdef __GNUC__ __attribute__ ((format (printf, 1, 2))) |