|
void | crypt_set_log_callback (struct crypt_device *cd, void(*log)(int level, const char *msg, void *usrptr), void *usrptr) |
|
void | crypt_log (struct crypt_device *cd, int level, const char *msg) |
|
void | crypt_logf (struct crypt_device *cd, int level, const char *format,...) |
|
Set of functions and defines used in cryptsetup for logging purposes
◆ CRYPT_LOG_DEBUG
#define CRYPT_LOG_DEBUG -1 |
◆ CRYPT_LOG_DEBUG_JSON
#define CRYPT_LOG_DEBUG_JSON -2 |
debug log level - additional JSON output (for LUKS2)
◆ CRYPT_LOG_ERROR
#define CRYPT_LOG_ERROR 1 |
◆ CRYPT_LOG_NORMAL
#define CRYPT_LOG_NORMAL 0 |
◆ CRYPT_LOG_VERBOSE
#define CRYPT_LOG_VERBOSE 2 |
◆ crypt_log()
void crypt_log |
( |
struct crypt_device * |
cd, |
|
|
int |
level, |
|
|
const char * |
msg |
|
) |
| |
◆ crypt_logf()
void crypt_logf |
( |
struct crypt_device * |
cd, |
|
|
int |
level, |
|
|
const char * |
format, |
|
|
|
... |
|
) |
| |
Log function with variable arguments.
- Parameters
-
cd | crypt device handle |
level | log level |
format | formatted log message |
◆ crypt_set_log_callback()
void crypt_set_log_callback |
( |
struct crypt_device * |
cd, |
|
|
void(*)(int level, const char *msg, void *usrptr) |
log, |
|
|
void * |
usrptr |
|
) |
| |
Set log function.
- Parameters
-
cd | crypt device handle (can be NULL to set default log function) |
log | user defined log function reference; use level for log level, msg for message, and usrptr for identification in callback |
usrptr | provided identification in callback |
- Examples
- crypt_log_usage.c.