// Test 1: single Error line immedeately to errorlog
// (could be type Debug, Info, Warning, or Error)
$GLOBALS['phpgw']->log->write(array('text'=>'I-TestWrite, write: %1','p1'=>'This message should appear in log','file'=>__FILE__,'line'=>__LINE__));
// Test 2: A message should appear in log even if clearstack is called
$GLOBALS['phpgw']->log->message(array('text'=>'I-TestMsg, msg: %1','p1'=>'This message should appear in log','file'=>__FILE__,'line'=>__LINE__));
$GLOBALS['phpgw']->log->error(array('text'=>'I-TestInfo, info: %1','p1'=>'This Informational should not be in log','file'=>__FILE__,'line'=>__LINE__));
$GLOBALS['phpgw']->log->clearstack();
$GLOBALS['phpgw']->log->commit();// commit error stack to log...
// Test 3: one debug message
$GLOBALS['phpgw']->log->error(array('text'=>'D-Debug, dbg: %1','p1'=>'This debug statment should be in log','file'=>__FILE__,'line'=>__LINE__));
$GLOBALS['phpgw']->log->commit();// commit error stack to log...
// Test 3: debug and one informational
$GLOBALS['phpgw']->log->error(array('text'=>'D-Debug, dbg: %1','p1'=>'This debug statment should be in log','file'=>__FILE__,'line'=>__LINE__));
$GLOBALS['phpgw']->log->error(array('text'=>'I-TestInfo, info: %1','p1'=>'This Informational should be in log','file'=>__FILE__,'line'=>__LINE__));
$GLOBALS['phpgw']->log->commit();// commit error stack to log...
// Test 4: an informational and a Warning
$GLOBALS['phpgw']->log->error(array('text'=>'D-Debug, dbg: %1','p1'=>'This debug statment should be in log','file'=>__FILE__,'line'=>__LINE__));
$GLOBALS['phpgw']->log->error(array('text'=>'I-TestInfo, info: %1','p1'=>'This Informational should be in log','file'=>__FILE__,'line'=>__LINE__));
$GLOBALS['phpgw']->log->error(array('text'=>'W-TestWarn, warn: %1','p1'=>'This is a test Warning','file'=>__FILE__,'line'=>__LINE__));
$GLOBALS['phpgw']->log->commit();// commit error stack to log...
// Test 5: and an error
$GLOBALS['phpgw']->log->error(array('text'=>'D-Debug, dbg: %1','p1'=>'This debug statment should be in log','file'=>__FILE__,'line'=>__LINE__));
$GLOBALS['phpgw']->log->error(array('text'=>'I-TestInfo, info: %1','p1'=>'This Informational should be in log','file'=>__FILE__,'line'=>__LINE__));
$GLOBALS['phpgw']->log->error(array('text'=>'W-TestWarn, warn: %1','p1'=>'This is a test Warning','file'=>__FILE__,'line'=>__LINE__));
$GLOBALS['phpgw']->log->error(array('text'=>'E-TestError, err: %1','p1'=>'This is a test Error','file'=>__FILE__,'line'=>__LINE__));
$GLOBALS['phpgw']->log->commit();// commit error stack to log...
// Test 6: and finally a fatal...
$GLOBALS['phpgw']->log->error(array('text'=>'D-Debug, dbg: %1','p1'=>'This debug statment should be in log','file'=>__FILE__,'line'=>__LINE__));
$GLOBALS['phpgw']->log->error(array('text'=>'I-TestInfo, info: %1','p1'=>'This Informational should be in log','file'=>__FILE__,'line'=>__LINE__));
$GLOBALS['phpgw']->log->error(array('text'=>'W-TestWarn, warn: %1','p1'=>'This is a test Warning','file'=>__FILE__,'line'=>__LINE__));
$GLOBALS['phpgw']->log->error(array('text'=>'E-TestError, err: %1','p1'=>'This is a test Error','file'=>__FILE__,'line'=>__LINE__));