Definition at line 8 of file File.php.
◆ __construct()
Initialize the output.
- Parameters
-
Definition at line 35 of file File.php.
References SimpleSAML_Configuration\getPathValue().
38 if ($this->logDir === NULL) {
39 throw new Exception(
'Missing "directory" option for core:File');
41 if (!is_dir($this->logDir)) {
42 throw new Exception(
'Could not find log directory: ' . var_export($this->logDir, TRUE));
getPathValue($name, $default=null)
Retrieve a path configuration option set in config.php.
◆ emit()
sspmod_core_Stats_Output_File::emit |
( |
array |
$data | ) |
|
Write a stats event.
- Parameters
-
Definition at line 79 of file File.php.
References $time, $timestamp, file, and openLog().
80 assert(
'isset($data["time"])');
83 $milliseconds = (int)((
$time - (
int)
$time) * 1000);
85 $timestamp = gmdate(
'Y-m-d\TH:i:s', $time) . sprintf(
'.%03dZ', $milliseconds);
89 if ($outDate !== $this->fileDate) {
94 fwrite($this->
file, $line);
openLog($date)
Open a log file.
Reload workbook from saved file
foreach($mandatory_scripts as $file) $timestamp
◆ openLog()
sspmod_core_Stats_Output_File::openLog |
( |
|
$date | ) |
|
|
private |
Open a log file.
- Parameters
-
string | $date | The date for the log file. |
Definition at line 53 of file File.php.
References file.
Referenced by emit().
54 assert(
'is_string($date)');
56 if ($this->
file !== NULL && $this->
file !== FALSE) {
61 $fileName = $this->logDir .
'/' . $date .
'.log';
62 $this->
file = @fopen($fileName,
'a');
63 if ($this->
file === FALSE) {
68 stream_set_write_buffer($this->
file, 0);
70 $this->fileDate = $date;
Reload workbook from saved file
◆ $file
sspmod_core_Stats_Output_File::$file = NULL |
|
private |
◆ $fileDate
sspmod_core_Stats_Output_File::$fileDate = NULL |
|
private |
◆ $logDir
sspmod_core_Stats_Output_File::$logDir |
|
private |
The documentation for this class was generated from the following file:
- libs/composer/vendor/simplesamlphp/simplesamlphp/modules/core/lib/Stats/Output/File.php