--- nfo/php/libs/org.netfrag.glib/Class/Logger.php 2003/03/28 03:04:26 1.10 +++ nfo/php/libs/org.netfrag.glib/Class/Logger.php 2003/03/28 06:44:20 1.11 @@ -14,9 +14,12 @@ * *
  *
- *  $Id: Logger.php,v 1.10 2003/03/28 03:04:26 joko Exp $
+ *  $Id: Logger.php,v 1.11 2003/03/28 06:44:20 joko Exp $
  *
  *  $Log: Logger.php,v $
+ *  Revision 1.11  2003/03/28 06:44:20  joko
+ *  VERBOSE mode
+ *
  *  Revision 1.10  2003/03/28 03:04:26  joko
  *  enhanced conditions for debugging
  *
@@ -106,6 +109,7 @@
     $this->_init_logger($logfile, 1);
   }
 
+
   // TODO: split by loglevel here to make seperated logfiles possible (debug, normal, errors)
   // TODO: optional: transmit logging messages via tcp - don't write them to disk (a handler for PEAR::Log)
   function log($msg, $level = PEAR_LOG_DEBUG) {
@@ -127,12 +131,17 @@
     if ($debug_condition) { $label = 'Debug'; $color = 'darkgreen'; }
     if ($error_condition) { $label = 'Error'; $color = 'red'; }
     
-    $stdout_condition = $level && ($debug_condition || $error_condition);
+    $stdout_condition = constants::get('VERBOSE') && $level && ($debug_condition || $error_condition);
     if ($stdout_condition) {
       // TODO: what now?
       //user_error($msg);
       //print "
$label[$level]: $msg
"; - print "
$label[$level]: $msg
"; + $style = html_style("text/css", '.boxlabel_red { color: red; font-weight:bold; }'); + $box = html_span(); + //$box->set_style("border-bottom: 1px solid black;"); + $box->add( html_span('boxlabel_red', $label), "[$level]: $msg", html_br() ); + print $style->render(); + print $box->render(); } }