Move clogger to libcryptsetup_cli crypt_cli_logger.

This commit is contained in:
Ondrej Kozina
2020-07-02 13:45:22 +02:00
committed by Milan Broz
parent cf2e099087
commit cfcc908cae
5 changed files with 31 additions and 36 deletions

View File

@@ -56,6 +56,15 @@ int crypt_cli_arg_value(struct crypt_cli *ctx, const char *name, void *value);
int crypt_cli_arg_type(struct crypt_cli *ctx, const char *name, crypt_arg_type_info *type);
void crypt_cli_logger(struct crypt_device *cd, int level, const char *file, int line,
const char *format, ...);
/* Log */
#define log_dbg(x...) crypt_cli_logger(NULL, CRYPT_LOG_DEBUG, __FILE__, __LINE__, x)
#define log_std(x...) crypt_cli_logger(NULL, CRYPT_LOG_NORMAL, __FILE__, __LINE__, x)
#define log_verbose(x...) crypt_cli_logger(NULL, CRYPT_LOG_VERBOSE, __FILE__, __LINE__, x)
#define log_err(x...) crypt_cli_logger(NULL, CRYPT_LOG_ERROR, __FILE__, __LINE__, x)
#ifdef __cplusplus
}
#endif