1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

Option to revert to default logging function after using a custom one.

This commit is contained in:
Alasdair Kergon 2003-12-21 16:08:20 +00:00
parent 607131b624
commit 1f86c3397e
2 changed files with 6 additions and 3 deletions

View File

@ -28,8 +28,8 @@ typedef void (*dm_log_fn) (int level, const char *file, int line,
/*
* The library user may wish to register their own
* logging function, by default errors go to
* stderr.
* logging function, by default errors go to stderr.
* Use dm_log_init(NULL) to restore the default log fn.
*/
void dm_log_init(dm_log_fn fn);
void dm_log_init_verbose(int level);

View File

@ -56,7 +56,10 @@ dm_log_fn _log = _default_log;
void dm_log_init(dm_log_fn fn)
{
if (fn)
_log = fn;
else
_log = _default_log;
}
void dm_log_init_verbose(int level)