LOG: add qb_log_file_close()

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
This commit is contained in:
Angus Salkeld 2011-03-30 21:22:27 +11:00
parent 2836e5bcf9
commit da28f16dd8
2 changed files with 11 additions and 0 deletions

View File

@ -178,6 +178,11 @@ int32_t qb_log_filter_ctl(uint32_t t, enum qb_log_filter_conf c,
int32_t qb_log_file_open(const char *filename);
/**
* Close a log file and release is resources.
*/
void qb_log_file_close(int32_t t);
/**
* Start the logging pthread.
*/

View File

@ -84,4 +84,10 @@ int32_t qb_log_file_open(const char *filename)
return t->pos;
}
void qb_log_file_close(int32_t t)
{
struct qb_log_target * target = qb_log_target_get(t);
target->close(target);
qb_log_target_free(target);
}