1
0
mirror of synced 2025-02-16 20:23:16 +03:00
Alex Lushpai f4000c9874 v2.0
2017-05-31 15:24:46 +03:00

30 lines
539 B
PHP

<?php
namespace Retailcrm\Retailcrm\Model\Logger;
class Logger
{
private $logPath;
private $files;
public function __construct(
$logPath = '/app/code/Retailcrm/Retailcrm/Log/'
)
{
$this->logPath = $logPath;
}
public function write($dump, $file)
{
$path =$this->logPath . $file.'.txt';
$f = fopen($_SERVER["DOCUMENT_ROOT"].$path, "a+");
fwrite($f, print_r(array(date('Y-m-d H:i:s'), array(
$dump
)),true));
fclose($f);
}
}