fsnotifier self diagnostics
authorRoman Shevchenko <roman.shevchenko@jetbrains.com>
Wed, 21 Apr 2010 14:41:15 +0000 (18:41 +0400)
committerRoman Shevchenko <roman.shevchenko@jetbrains.com>
Wed, 21 Apr 2010 14:41:52 +0000 (18:41 +0400)
native/fsNotifier/linux/fsnotifier
native/fsNotifier/linux/main.c

index ace4619f3eb414803e9b7430838cc04000b5c090..01b4303ba840358c0237858563862b5f844a6b9f 100755 (executable)
Binary files a/native/fsNotifier/linux/fsnotifier and b/native/fsNotifier/linux/fsnotifier differ
index 192ce9288fae541a10c45e493951296461bc9b92..68a57538cef626fd917d309758d00a7598413e63 100644 (file)
@@ -145,7 +145,13 @@ void userlog(int priority, const char* format, ...) {
   vsyslog(priority, format, ap);
 
   if (self_test) {
   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");
   }
     vprintf(format, ap);
     printf("\n");
   }