add log level

This commit is contained in:
liuwentan
2023-03-28 15:41:24 +08:00
parent e98627c9e7
commit 4eee0ede80
4 changed files with 312 additions and 68 deletions

View File

@@ -235,13 +235,14 @@ int maat_options_set_redis(struct maat_options *opts, const char *redis_ip,
return 0;
}
int maat_options_set_logger_path(struct maat_options *opts, const char *log_path)
int maat_options_set_logger(struct maat_options *opts, const char *log_path, enum log_level level)
{
if (NULL == opts || NULL == log_path || strlen(log_path) >= PATH_MAX) {
return -1;
}
memcpy(opts->log_path, log_path, strlen(log_path));
opts->log_level = level;
return 0;
}