Introduce log-levels.h

To teach restorer code the log levels we
need a separate file for their definition.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
Cyrill Gorcunov 2012-09-03 14:43:51 +04:00 committed by Pavel Emelyanov
parent 3234308d62
commit ff7d7455e2
2 changed files with 12 additions and 6 deletions

10
include/log-levels.h Normal file
View file

@ -0,0 +1,10 @@
#ifndef LOG_LEVELS_H__
#define LOG_LEVELS_H__
#define LOG_MSG (0) /* Print message regardless of log level */
#define LOG_ERROR (1) /* Errors only, when we're in trouble */
#define LOG_WARN (2) /* Warnings, dazen and confused but trying to continue */
#define LOG_INFO (3) /* Informative, everything is fine */
#define LOG_DEBUG (4) /* Debug only */
#endif /* LOG_LEVELS_H__ */

View file

@ -1,6 +1,8 @@
#ifndef LOG_H__
#define LOG_H__
#include "log-levels.h"
extern int log_init(const char *output);
extern void log_fini(void);
extern int log_init_by_pid(void);
@ -13,12 +15,6 @@ extern void log_set_loglevel(unsigned int loglevel);
extern void print_on_level(unsigned int loglevel, const char *format, ...)
__attribute__ ((__format__ (__printf__, 2, 3)));
#define LOG_MSG (0) /* Print message regardless of log level */
#define LOG_ERROR (1) /* Errors only, when we're in trouble */
#define LOG_WARN (2) /* Warnings, dazen and confused but trying to continue */
#define LOG_INFO (3) /* Informative, everything is fine */
#define LOG_DEBUG (4) /* Debug only */
#ifndef LOG_PREFIX
# define LOG_PREFIX
#endif