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);
}
}