Potsky\LaravelLocalizationHelpers\Command\LocalizationAbstract::logInFile PHP Method

logInFile() protected method

Log in a file for debug purpose only
protected logInFile ( mixed $txt = '', string $logFile = '/tmp/llh.log' )
$txt mixed
$logFile string
    protected function logInFile($txt = '', $logFile = '/tmp/llh.log')
    {
        if (!is_string($txt)) {
            $txt = print_r($txt, true);
        }
        $txt = '==> ' . date('Y/m/d H:i:s') . ' ==> ' . $txt . "\n";
        if (self::$logInFileFirst === true) {
            file_put_contents($logFile, $txt);
            self::$logInFileFirst = false;
        } else {
            file_put_contents($logFile, $txt, FILE_APPEND);
        }
    }