fsnotifier self diagnostics

This commit is contained in:
Roman Shevchenko
2010-04-21 18:41:52 +04:00
parent 24156136b3
commit 8429f6f1e0
2 changed files with 7 additions and 1 deletions
Binary file not shown.
+7 -1
View File
@@ -145,7 +145,13 @@ void userlog(int priority, const char* format, ...) {
vsyslog(priority, format, ap);
if (self_test) {
printf("fsnotifier[%d]: ", getpid());
const char* level = "debug";
switch (priority) {
case LOG_ERR: level = "error"; break;
case LOG_WARNING: level = " warn"; break;
case LOG_INFO: level = " info"; break;
}
printf("fsnotifier[%d] %s: ", getpid(), level);
vprintf(format, ap);
printf("\n");
}