[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 28/107: Debug : add function tracedebug
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 28/107: Debug : add function tracedebug |
Date: |
Mon, 26 Aug 2019 10:31:50 -0400 (EDT) |
sparkyx pushed a commit to branch master
in repository noalyss.
commit 61d6bea5b1a65362bce09cb0aeff4c58c953e472
Author: Dany De Bontridder <address@hidden>
Date: Sun Jun 30 17:40:24 2019 +0200
Debug : add function tracedebug
---
include/lib/ac_common.php | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/include/lib/ac_common.php b/include/lib/ac_common.php
index ca7d654..86d40f4 100644
--- a/include/lib/ac_common.php
+++ b/include/lib/ac_common.php
@@ -1325,4 +1325,26 @@ function record_log($p_message)
error_log("noalyss GET [".var_export($_GET, true)."]",0);
error_log( "noalyss POST [".var_export($_POST, true)."]",0);
}
+if(!function_exists('tracedebug')) {
+ function tracedebug($file,$var, $label = NULL) {
+
+ $tmp_file = sys_get_temp_dir().DIRECTORY_SEPARATOR.$file;
+
+ $output = '';
+ $output .= date('d-m-y H:i');
+ if(!is_null($label)) {
+ $output .= $label . ': ';
+ }
+ if ( gettype ($var) == 'object' && get_class($var)=='DOMDocument')
+ {
+ $var->formatOutput=true;
+ $output.=$var->saveXML() .PHP_EOL;
+ } else
+ {
+ $output .= print_r($var, 1) . PHP_EOL;
+ }
+
+ file_put_contents($tmp_file, $output, FILE_APPEND);
+ }
+}
?>
- [Noalyss-commit] [noalyss] 33/107: Small bug use the date instead of now for table version, (continued)
- [Noalyss-commit] [noalyss] 33/107: Small bug use the date instead of now for table version, Dany De Bontridder, 2019/08/26
- [Noalyss-commit] [noalyss] 40/107: PHPUnit : adapt to new version, Dany De Bontridder, 2019/08/26
- [Noalyss-commit] [noalyss] 61/107: Documentation, Dany De Bontridder, 2019/08/26
- [Noalyss-commit] [noalyss] 62/107: #1316: Notes tableau de bord - pas de limite ou choix., Dany De Bontridder, 2019/08/26
- [Noalyss-commit] [noalyss] 69/107: Fix test, Dany De Bontridder, 2019/08/26
- [Noalyss-commit] [noalyss] 50/107: Documentation : automatic format breaks doxygen tag, Dany De Bontridder, 2019/08/26
- [Noalyss-commit] [noalyss] 43/107: fixup! Code cleaning : split database into database (for noalyss) and databasecore , with the functions, Dany De Bontridder, 2019/08/26
- [Noalyss-commit] [noalyss] 65/107: Code cleaning : remove obsolete, and direct access to, Dany De Bontridder, 2019/08/26
- [Noalyss-commit] [noalyss] 74/107: New : manage_table_sql has new function (input_custom and display_row_custom) for handling special data, Dany De Bontridder, 2019/08/26
- [Noalyss-commit] [noalyss] 73/107: Cosmetic & bug fix for SELECT_BOX, Dany De Bontridder, 2019/08/26
- [Noalyss-commit] [noalyss] 28/107: Debug : add function tracedebug,
Dany De Bontridder <=
- [Noalyss-commit] [noalyss] 32/107: Cosmetic : font new symbol Cosmetic : CSS padding for div.menu2 a.mtitle, Dany De Bontridder, 2019/08/26
- [Noalyss-commit] [noalyss] 58/107: javascript Add new function json_response, Dany De Bontridder, 2019/08/26
- [Noalyss-commit] [noalyss] 52/107: Adapt Unit Test, Dany De Bontridder, 2019/08/26
- [Noalyss-commit] [noalyss] 76/107: fixup! Improve message progress bar + translation, Dany De Bontridder, 2019/08/26
- [Noalyss-commit] [noalyss] 78/107: Purpose is to contain all the prepared query called from different locations, Dany De Bontridder, 2019/08/26
- [Noalyss-commit] [noalyss] 83/107: Task#1734 New : Add PRINTTVA to have a summary of VAT by ledger, Dany De Bontridder, 2019/08/26
- [Noalyss-commit] [noalyss] 93/107: Documentation, Dany De Bontridder, 2019/08/26
- [Noalyss-commit] [noalyss] 92/107: Code : remove direct use of $_GET, Dany De Bontridder, 2019/08/26
- [Noalyss-commit] [noalyss] 39/107: Code cleaning : split database into database (for noalyss) and databasecore , with the functions, Dany De Bontridder, 2019/08/26
- [Noalyss-commit] [noalyss] 98/107: New :: function Icon_Action::tips for short comment New : Icon_Action::unlock, Dany De Bontridder, 2019/08/26