mirror of
https://github.com/grocy/grocy.git
synced 2026-04-05 12:26:15 +02:00
comment out debug printing to log file
This commit is contained in:
parent
72f60bc321
commit
1659e151a7
|
|
@ -119,9 +119,9 @@ class StockApiController extends BaseApiController
|
|||
|
||||
$result = null;
|
||||
|
||||
$fp = fopen('/www/data/sql.log', 'a');
|
||||
fwrite($fp, "???executing api consume product");
|
||||
$time_start = microtime(true);
|
||||
#$fp = fopen('/www/data/sql.log', 'a');
|
||||
#fwrite($fp, "???executing api consume product");
|
||||
#$time_start = microtime(true);
|
||||
|
||||
try
|
||||
{
|
||||
|
|
@ -166,8 +166,8 @@ class StockApiController extends BaseApiController
|
|||
{
|
||||
$result = $this->GenericErrorResponse($response, $ex->getMessage());
|
||||
}
|
||||
fwrite($fp, "???API Consume product - Total execution time in seconds: " . round((microtime(true) - $time_start),6) . "\n");
|
||||
fclose($fp);
|
||||
#fwrite($fp, "???API Consume product - Total execution time in seconds: " . round((microtime(true) - $time_start),6) . "\n");
|
||||
#fclose($fp);
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -11,9 +11,9 @@ class StockController extends BaseController
|
|||
|
||||
public function __construct(\Slim\Container $container)
|
||||
{
|
||||
$fp = fopen('/www/data/sql.log', 'a');
|
||||
fwrite($fp, "!!!constructing StockController\n");
|
||||
fclose($fp);
|
||||
#$fp = fopen('/www/data/sql.log', 'a');
|
||||
#fwrite($fp, "!!!constructing StockController\n");
|
||||
#fclose($fp);
|
||||
parent::__construct($container);
|
||||
$this->StockService = new StockService();
|
||||
$this->UserfieldsService = new UserfieldsService();
|
||||
|
|
|
|||
|
|
@ -21,9 +21,9 @@ class PDOWrap
|
|||
public function __call($name,$pars){
|
||||
$result = null;
|
||||
|
||||
$fp = fopen('/www/data/sql.log', 'a');
|
||||
fwrite($fp, "PDO::".$name." called with arguments:- ".implode( ", ", $pars)."\n");
|
||||
$time_start = microtime(true);
|
||||
#$fp = fopen('/www/data/sql.log', 'a');
|
||||
#fwrite($fp, "PDO::".$name." called with arguments:- ".implode( ", ", $pars)."\n");
|
||||
#$time_start = microtime(true);
|
||||
if(in_array($name, array("exec","query")))
|
||||
{
|
||||
fwrite($fp, array_values($pars)[0] . "\n");
|
||||
|
|
@ -31,8 +31,8 @@ class PDOWrap
|
|||
}else{
|
||||
$result = call_user_func_array([$this->instance,$name],$pars);
|
||||
}
|
||||
fwrite($fp, "Total execution time in seconds: " . round((microtime(true) - $time_start),6) . "\n");
|
||||
fclose($fp);
|
||||
#fwrite($fp, "Total execution time in seconds: " . round((microtime(true) - $time_start),6) . "\n");
|
||||
#fclose($fp);
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
|
|
@ -77,16 +77,16 @@ class DatabaseService
|
|||
if (self::$DbConnectionRaw == null)
|
||||
#if ($this->DbConnectionRaw == null)
|
||||
{
|
||||
$fp = fopen('/www/data/sql.log', 'a');
|
||||
fwrite($fp, "+++Creating new PDO object\n");
|
||||
$time_start = microtime(true);
|
||||
#$fp = fopen('/www/data/sql.log', 'a');
|
||||
#fwrite($fp, "+++Creating new PDO object\n");
|
||||
#$time_start = microtime(true);
|
||||
$pdo = new PDOWrap('sqlite:' . $this->GetDbFilePath());
|
||||
$pdo->setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION);
|
||||
self::$DbConnectionRaw = $pdo;
|
||||
#$this->DbConnectionRaw = $pdo;
|
||||
fwrite($fp, "+++Total execution time in seconds: " . round((microtime(true) - $time_start),6) . "\n");
|
||||
fwrite($fp, "+++object created\n");
|
||||
fclose($fp);
|
||||
#fwrite($fp, "+++Total execution time in seconds: " . round((microtime(true) - $time_start),6) . "\n");
|
||||
#fwrite($fp, "+++object created\n");
|
||||
#fclose($fp);
|
||||
}
|
||||
|
||||
return self::$DbConnectionRaw;
|
||||
|
|
@ -103,14 +103,14 @@ class DatabaseService
|
|||
if (self::$DbConnection == null)
|
||||
#if ($this->DbConnection == null)
|
||||
{
|
||||
$fp = fopen('/www/data/sql.log', 'a');
|
||||
fwrite($fp, "---creating new LessQL::Database object\n");
|
||||
$time_start = microtime(true);
|
||||
#$fp = fopen('/www/data/sql.log', 'a');
|
||||
#fwrite($fp, "---creating new LessQL::Database object\n");
|
||||
#$time_start = microtime(true);
|
||||
self::$DbConnection = new \LessQL\Database($this->GetDbConnectionRaw());
|
||||
#$this->DbConnection = new \LessQL\Database($this->GetDbConnectionRaw());
|
||||
fwrite($fp, "---Total execution time in seconds: " . round((microtime(true) - $time_start),6) . "\n");
|
||||
fwrite($fp, "---object created\n");
|
||||
fclose($fp);
|
||||
#fwrite($fp, "---Total execution time in seconds: " . round((microtime(true) - $time_start),6) . "\n");
|
||||
#fwrite($fp, "---object created\n");
|
||||
#fclose($fp);
|
||||
}
|
||||
|
||||
return self::$DbConnection;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user