diff options
author | anozdrin/alik@booka. <> | 2006-11-21 17:47:14 +0300 |
---|---|---|
committer | anozdrin/alik@booka. <> | 2006-11-21 17:47:14 +0300 |
commit | 3e042c6d7b91e3725ff21015f3265b9afe8d93af (patch) | |
tree | 013e928c88c019dc5bfaa9bd7713f68f41037ac5 /server-tools/instance-manager/log.h | |
parent | ff0325f1625f2802d0080b506f164ca3aa9c1126 (diff) | |
download | mariadb-git-3e042c6d7b91e3725ff21015f3265b9afe8d93af.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.
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))) |