Commit 8fed0111 by sn

jetzt auch mit html output in extra Datei: http://host/mc_D_LOGFILE.log.html

1 parent 86d5667a
Showing with 24 additions and 1 deletions
...@@ -65,7 +65,7 @@ class D { ...@@ -65,7 +65,7 @@ class D {
} }
} }
public static function printToScreen() { public static function printToScreen($param_return=false) {
global $__mc_D_LOGFILE_ONLY_USER; global $__mc_D_LOGFILE_ONLY_USER;
...@@ -78,10 +78,23 @@ class D { ...@@ -78,10 +78,23 @@ class D {
// } // }
} }
if($param_return) {
return $screen_content;
} else {
echo $screen_content; echo $screen_content;
} }
}
}
public static function printToHtmlFile($param_filename, $param_kindof = 'w') {
$screen_content = D::printToScreen(true);
mcFile::write($param_filename, $screen_content, $param_kindof);
} }
public static function printPDOQuery($param_query, array $param_bindValueArray=null, $param_print=true, $param_force=false) { public static function printPDOQuery($param_query, array $param_bindValueArray=null, $param_print=true, $param_force=false) {
// $return = ''; // $return = '';
......
...@@ -15,6 +15,9 @@ if(!isset($_LOSP_DEV)) { ...@@ -15,6 +15,9 @@ if(!isset($_LOSP_DEV)) {
if($_LOSP_DEV) { if($_LOSP_DEV) {
$__THIS_SCRIPT_INFO = pathinfo($_SERVER['SCRIPT_FILENAME']); $__THIS_SCRIPT_INFO = pathinfo($_SERVER['SCRIPT_FILENAME']);
// echo $__THIS_SCRIPT_INFO['filename']; // echo $__THIS_SCRIPT_INFO['filename'];
if(!isset($__mc_D_LOGFILE_HTML)) {
$__mc_D_LOGFILE_HTML = $__mc_LOGDIR.'mcClasses.'.$__THIS_SCRIPT_INFO['filename'].'.'.$string.'.DEV_D.html';
}
} }
/** /**
* @todo @since 20110325 die vars müssen eigentlich hier aus __mc raus ... da sie freeSN abhängig sind @author f@mensch.coop * @todo @since 20110325 die vars müssen eigentlich hier aus __mc raus ... da sie freeSN abhängig sind @author f@mensch.coop
...@@ -31,12 +34,15 @@ if(!isset($__mc_LOGDIR)) { ...@@ -31,12 +34,15 @@ if(!isset($__mc_LOGDIR)) {
$__mc_LOGDIR = ''; $__mc_LOGDIR = '';
} }
if(!isset($__mc_D_LOGFILE)) { if(!isset($__mc_D_LOGFILE)) {
/** /**
* @var string -- file for the D Output * @var string -- file for the D Output
*/ */
$__mc_D_LOGFILE = $__mc_LOGDIR.'mcClasses.'.$__THIS_SCRIPT_INFO['filename'].'.'.$string.'.DEV_D.log'; $__mc_D_LOGFILE = $__mc_LOGDIR.'mcClasses.'.$__THIS_SCRIPT_INFO['filename'].'.'.$string.'.DEV_D.log';
if(!isset($__mc_D_LOGFILE_RESET)) { if(!isset($__mc_D_LOGFILE_RESET)) {
/** /**
* @var bool * @var bool
......
...@@ -25,6 +25,10 @@ if($_LOSP_DEV) { ...@@ -25,6 +25,10 @@ if($_LOSP_DEV) {
D::printToScreen(); D::printToScreen();
} }
if($__mc_D_LOGFILE_HTML) {
D::printToHtmlFile($__mc_D_LOGFILE_HTML);
}
if($__mc_D_LOGFILE) { if($__mc_D_LOGFILE) {
D::printToFile($__mc_D_LOGFILE,'a'); D::printToFile($__mc_D_LOGFILE,'a');
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!