TYPO3
7.6
|
Public Member Functions | |
__construct (array $options=array()) | |
__destruct () | |
setLogFile ($relativeLogFile) | |
getLogFile () | |
writeLog (LogRecord $record) | |
Public Member Functions inherited from AbstractWriter | |
__construct (array $options=array()) | |
Public Member Functions inherited from WriterInterface | |
writeLog (\TYPO3\CMS\Core\Log\LogRecord $record) | |
Protected Member Functions | |
openLogFile () | |
closeLogFile () | |
createLogFile () | |
createHtaccessFile ($htaccessFile) | |
getDefaultLogFileName () | |
Protected Attributes | |
$logFile = '' | |
$defaultLogFileTemplate = 'typo3temp/logs/typo3_%s.log' | |
Static Protected Attributes | |
static | $logFileHandles = array() |
Log writer that writes the log records into a file.
Definition at line 26 of file FileWriter.php.
__construct | ( | array | $options = array() | ) |
Constructor, opens the log file handle
array | $options |
Definition at line 59 of file FileWriter.php.
References FileWriter\getDefaultLogFileName(), and FileWriter\setLogFile().
__destruct | ( | ) |
Destructor, closes the log file handle
Definition at line 71 of file FileWriter.php.
References FileWriter\closeLogFile().
|
protected |
Closes the log file handle.
Definition at line 172 of file FileWriter.php.
Referenced by FileWriter\__destruct().
|
protected |
Creates .htaccess file inside a new directory to access protect it
string | $htaccessFile | Path of .htaccess file |
Definition at line 207 of file FileWriter.php.
References $GLOBALS, and GeneralUtility\writeFile().
Referenced by FileWriter\createLogFile().
|
protected |
Creates the log file with correct permissions and parent directories, if needed
Definition at line 186 of file FileWriter.php.
References FileWriter\createHtaccessFile(), GeneralUtility\mkdir_deep(), and GeneralUtility\writeFile().
Referenced by FileWriter\openLogFile().
|
protected |
Returns the path to the default log file.
Uses the defaultLogFileTemplate and replaces the s placeholder with a short MD5 hash based on a static string and the current encryption key.
Definition at line 236 of file FileWriter.php.
References GeneralUtility\hmac().
Referenced by FileWriter\__construct().
getLogFile | ( | ) |
Gets the path to the log file.
Definition at line 104 of file FileWriter.php.
References FileWriter\$logFile.
|
protected |
Opens the log file handle
\RuntimeException | if the log file can't be opened. |
Definition at line 154 of file FileWriter.php.
References FileWriter\$logFile, and FileWriter\createLogFile().
Referenced by FileWriter\setLogFile().
setLogFile | ( | $relativeLogFile | ) |
Sets the path to the log file.
string | $relativeLogFile | path to the log file, relative to PATH_site |
InvalidLogWriterConfigurationException |
Definition at line 83 of file FileWriter.php.
References FileWriter\$logFile, GeneralUtility\getFileAbsFileName(), PathUtility\isAbsolutePath(), and FileWriter\openLogFile().
Referenced by FileWriter\__construct().
writeLog | ( | LogRecord | $record | ) |
Writes the log record
\RuntimeException |
Definition at line 116 of file FileWriter.php.
References LogRecord\getComponent(), LogRecord\getCreated(), LogRecord\getData(), LogRecord\getLevel(), LogRecord\getMessage(), LogLevel\getName(), and LogRecord\getRequestId().
|
protected |
Definition at line 40 of file FileWriter.php.
|
protected |
Definition at line 33 of file FileWriter.php.
Referenced by FileWriter\getLogFile(), FileWriter\openLogFile(), and FileWriter\setLogFile().
|
staticprotected |
Definition at line 51 of file FileWriter.php.