Przeglądaj źródła

more readable logging

Anthony Bretaudeau 7 lat temu
rodzic
commit
4105bd9793

+ 0 - 3
tripal/api/tripal.entities.api.inc

@@ -475,9 +475,6 @@ function tripal_tripal_cron_notification() {
         $num_created++;
       }
     }
-    if ($num_created == 0) {
-      watchdog('tripal_cron', '<pre>No new fields for '. print_r($bundle_name->name, TRUE) .'</pre>');
-    }
   }
 }
 

+ 4 - 5
tripal/api/tripal.importer.api.inc

@@ -95,6 +95,8 @@ function tripal_run_importer($import_id, TripalJob $job = NULL) {
   $loader->setJob($job);
   $loader->prepareFiles();
 
+  print "\nRunning '".$loader::$name."' importer";
+
   print "\nNOTE: Loading of file is performed using a database transaction. \n" .
         "If it fails or is terminated prematurely then all insertions and \n" .
         "updates are rolled back and will not be found in the database\n\n";
@@ -112,10 +114,8 @@ function tripal_run_importer($import_id, TripalJob $job = NULL) {
     // Check for new fields and notify the user.
     tripal_tripal_cron_notification();
 
-    // Clear the Drpual chace
+    // Clear the Drupal cache
     cache_clear_all();
-
-    print "\nDone\n";
   }
   catch (Exception $e) {
     if ($job) {
@@ -145,7 +145,7 @@ function tripal_run_importer_run($loader, $job) {
     $loader->run();
 
     if ($job) {
-      $job->logMessage("Done");
+      $job->logMessage("\nDone importing");
     }
 
     // Remove the temp file
@@ -181,4 +181,3 @@ function tripal_run_importer_post_run($loader, $job) {
     throw $e;
   }
 }
-