[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 03/30: Improve Debug info presentation
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 03/30: Improve Debug info presentation |
Date: |
Sat, 3 Dec 2022 08:35:06 -0500 (EST) |
sparkyx pushed a commit to branch master
in repository noalyss.
commit cc55b135383ca1e6ffbca058d9c539474bbafcbc
Author: sparkyx <danydb@noalyss.eu>
AuthorDate: Thu Nov 17 13:04:15 2022 +0100
Improve Debug info presentation
---
include/lib/dbg.php | 15 ++++++++++++---
include/print_currency01.inc.php | 12 ++++++------
include/template/menu.php | 9 ++-------
3 files changed, 20 insertions(+), 16 deletions(-)
diff --git a/include/lib/dbg.php b/include/lib/dbg.php
index 5b6425853..e17af5121 100644
--- a/include/lib/dbg.php
+++ b/include/lib/dbg.php
@@ -8,7 +8,7 @@ class Dbg
public static function echo_var($n_level, $msg)
{
if (DEBUGNOALYSS > $n_level) {
- echo '<span style="font-size:12px;color:orangered">';
+ echo '<span
style="font-size:12px;color:orangered;background-color:lightyellow;">';
$type = gettype($msg);
if (in_array($type, ["string", "integer", "double"])) {
echo $msg;
@@ -22,10 +22,19 @@ class Dbg
}
}
+ public static function echo_function($msg)
+ {
+ if (DEBUGNOALYSS > 1) {
+ echo '<span
style="font-size:12px;color:lightgreen;background-color:lightyellow;">';
+ echo "[FILE: $msg]";
+
+ echo '</span>';
+ }
+ }
public static function echo_file($msg)
{
if (DEBUGNOALYSS > 1) {
- echo '<span style="font-size:12px;color:brown">';
+ echo '<span
style="font-size:12px;color:brown;background-color:lightyellow;">';
echo "[FILE: $msg]";
echo '</span>';
@@ -120,4 +129,4 @@ EOF;
return $r;
}
}
-?>
\ No newline at end of file
+?>
diff --git a/include/print_currency01.inc.php b/include/print_currency01.inc.php
index 62cc5e6e4..c2739b7d1 100644
--- a/include/print_currency01.inc.php
+++ b/include/print_currency01.inc.php
@@ -57,9 +57,8 @@
$selCurrency->selected=$print_operation_currency->getData_operation()->getCurren
-if (DEBUGNOALYSS > 1) {
- echo "print_operation";
var_dump($print_operation_currency->getData_operation());
-}
+if ( DEBUGNOALYSS > 1) { echo \Noalyss\Dbg::hidden_info("print_operation
",$print_operation_currency->getData_operation());}
+
$msg["all"]=_("Aucun filtre");
$msg["by_card"]=_("Par fiche");
@@ -174,9 +173,10 @@ $select_box->add_javascript(_("Par catégorie de
fiche"),"show_currency_type_sea
<?php
try
{
- if (DEBUGNOALYSS > 1) {
- echo "SQL =
".$print_operation_currency->getData_operation()->build_SQL();
- }
+
+ \Noalyss\Dbg::echo_var(1 ,"SQL = ".
+ $print_operation_currency->getData_operation()->build_SQL());
+
echo $print_operation_currency->export_html();
}
diff --git a/include/template/menu.php b/include/template/menu.php
index 3d2756ad4..55567578e 100644
--- a/include/template/menu.php
+++ b/include/template/menu.php
@@ -1,13 +1,8 @@
<?php
//This file is part of NOALYSS and is under GPL
//see licence.txt
-if (DEBUGNOALYSS > 1 ) {
- echo <<<EOF
- <p> LEVEL MENU IS {$level}
- access_code {$access_code}
-EOF;
- // print_r($amenu);
-};
+ \Noalyss\Dbg::echo_var(1,"LEVEL MENU IS {$level} access_code
{$access_code}");
+
?><div class="">
<?php
- [Noalyss-commit] [noalyss] branch master updated (1a1bcd567 -> 67f776cff), Dany De Bontridder, 2022/12/03
- [Noalyss-commit] [noalyss] 07/30: Add __toString function for debugging purpose Improve DBG tools: print out or return a string, Dany De Bontridder, 2022/12/03
- [Noalyss-commit] [noalyss] 06/30: Cosmetic : waiting box, Dany De Bontridder, 2022/12/03
- [Noalyss-commit] [noalyss] 02/30: Bug : cosmetic , VAT in card is not aligned, Dany De Bontridder, 2022/12/03
- [Noalyss-commit] [noalyss] 25/30: Bug : missing class, Dany De Bontridder, 2022/12/03
- [Noalyss-commit] [noalyss] 18/30: Follow Up : can use enrich text for Comment and description, Dany De Bontridder, 2022/12/03
- [Noalyss-commit] [noalyss] 17/30: Merge branch 'dev9035-14', Dany De Bontridder, 2022/12/03
- [Noalyss-commit] [noalyss] 19/30: Cosmetic, Dany De Bontridder, 2022/12/03
- [Noalyss-commit] [noalyss] 27/30: Cosmetic : move tags in operation details, small cosmetic bug, Dany De Bontridder, 2022/12/03
- [Noalyss-commit] [noalyss] 03/30: Improve Debug info presentation,
Dany De Bontridder <=
- [Noalyss-commit] [noalyss] 09/30: New #0002216: Transformation d'une dépense Gestion en facture achat ou note de frais, Dany De Bontridder, 2022/12/03
- [Noalyss-commit] [noalyss] 29/30: Cosmetic : color, Dany De Bontridder, 2022/12/03
- [Noalyss-commit] [noalyss] 28/30: cosmetic, Dany De Bontridder, 2022/12/03
- [Noalyss-commit] [noalyss] 30/30: Cosmetic, Dany De Bontridder, 2022/12/03
- [Noalyss-commit] [noalyss] 04/30: Show tag in operations list, Dany De Bontridder, 2022/12/03
- [Noalyss-commit] [noalyss] 08/30: To let TOOLS plugin to add tag to operation, Dany De Bontridder, 2022/12/03
- [Noalyss-commit] [noalyss] 01/30: Bug : no filter on card for ledger PURCHASE, Dany De Bontridder, 2022/12/03
- [Noalyss-commit] [noalyss] 05/30: Cosmetic : display cards on one row in account search, Dany De Bontridder, 2022/12/03
- [Noalyss-commit] [noalyss] 11/30: Improve Test and set the Patch level to 181, Dany De Bontridder, 2022/12/03
- [Noalyss-commit] [noalyss] 13/30: Better error message when cannot save a plugin, Dany De Bontridder, 2022/12/03