<?php

namespace Teknisa\Libs\Controller;
use Zeedhi\Framework\DTO\Request;
use Zeedhi\Framework\DTO\Response;
use Zeedhi\Framework\DataSource\DataSet;
use Teknisa\Libs\Service\Log as LogService;
use Teknisa\Libs\Util\Utilities;

class Log {
    /** @var  LogService $logService */
    private $logService;

    protected $projectId;

    public function __construct(LogService $logService) {
        $this->logService = $logService;
    }

    public function logRegister($cdpesqitem, $dsoperacao, $idtipooper, $nmtabela, $dsmetusuoper, $cdOperRespApi = null, $organizationApi = null) {
        $dsnmusuoper = gethostname();
        $dsrdmusuoper = $_SERVER['HTTP_HOST'];
        $dsendusuoper = $_SERVER['SERVER_ADDR'];
        $this->logService->logRegister($cdpesqitem, $dsoperacao, $idtipooper, $nmtabela, $dsmetusuoper, $dsnmusuoper, $dsrdmusuoper, $dsendusuoper, $cdOperRespApi, $organizationApi);
    }

} 