diff options
author | Silvio <silvio@devlet.com.br> | 2010-08-20 16:34:03 -0300 |
---|---|---|
committer | Silvio <silvio@devlet.com.br> | 2010-08-20 16:34:03 -0300 |
commit | bf67bc20b46f3e464a21ca618e367efa503c6df6 (patch) | |
tree | 3c815de6c486eaeeb8d0f2825d49a056826c1564 /classes/IsisAudit.php | |
parent | 3ee2c153df3633c707da10a159c6104bfbe1c6d6 (diff) | |
download | cinisis-bf67bc20b46f3e464a21ca618e367efa503c6df6.tar.gz cinisis-bf67bc20b46f3e464a21ca618e367efa503c6df6.tar.bz2 |
Class logger for IsisAudit
Diffstat (limited to 'classes/IsisAudit.php')
-rw-r--r-- | classes/IsisAudit.php | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/classes/IsisAudit.php b/classes/IsisAudit.php index 63446e1..f2435a9 100644 --- a/classes/IsisAudit.php +++ b/classes/IsisAudit.php @@ -5,6 +5,22 @@ */ class IsisAudit extends IsisFinder { /** + * @var $log + * Log messages. + */ + var $log; + + /** + * Class logger. + * + * @param $message + * Log message. + */ + function logger($message) { + $this->log[] = $message; + } + + /** * Run a standard audit procedure. */ public function run() { @@ -13,10 +29,10 @@ class IsisAudit extends IsisFinder { // Check for repetitions. if ($field['repeat'] && !$repetition) { - echo "Field ". $field['name'] ." is configured for repetitions but no repetitions found.\n"; + $this->logger("Field ". $field['name'] ." is configured for repetitions but no repetitions found."); } elseif (!$field['repeat'] && $repetition) { - echo "Field ". $field['name'] ." is not configured for repetitions but a repetition was found for entry ". $repetition[0] .".\n"; + $this->logger("Field ". $field['name'] ." is not configured for repetitions but a repetition was found for entry ". $repetition[0] ."."); } // Check for subfields. @@ -25,7 +41,7 @@ class IsisAudit extends IsisFinder { $next_subfield = $this->nextSubfield($field, $subfield); if (!$next_subfield) { - echo "No occurrences found for field ". $field['name'] ." and subfield $subfield\n"; + $this->logger("No occurrences found for field ". $field['name'] ." and subfield $subfield."); } } } |