Improved logToChapril.php

This commit is contained in:
Didier Clermonté 2018-10-18 16:04:28 +02:00 committed by root
parent 7dd0d77664
commit f6ef4f4255
1 changed files with 3 additions and 3 deletions

View File

@ -70,9 +70,8 @@ class Filesystem extends AbstractData
*/
public function logToChapril($message, $id=null)
{
/** $texte_retour="\n $message $id ".date('h-i-s, j-m-y)." \n"; */
$today = date('H:i:s, j-m-Y');
$texte_retour="$message $id $today \n";
$today = date('Y-m-d H:i:s');
$texte_retour="$today $message \t$id\n";
return (bool) file_put_contents("/var/www/paste.chapril.org/paste.log",$texte_retour,FILE_APPEND|LOCK_EX);
}
@ -118,6 +117,7 @@ class Filesystem extends AbstractData
$paste->attachmentname = $paste->meta->attachmentname;
unset($paste->meta->attachmentname);
}
self::logToChapril("READ",$pasteid);
}
return $paste;
}