date.chapril.org-framadate/app/classes/Framadate/Services/LogService.php
Thomas Citharel 3157d6a590 Run php-cs-fixer with a custom config. This may break a lot of things
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2018-02-19 19:43:30 +01:00

23 lines
536 B
PHP

<?php
namespace Framadate\Services;
/**
* This service provides a standard way to log some informations.
*
* @package Framadate\Services
*/
class LogService {
function __construct() {
}
/**
* Log a message to the log file.
*
* @param $tag string A tag is used to quickly found a message when reading log file
* @param $message string some message
*/
function log($tag, $message) {
error_log(date('Ymd His') . ' [' . $tag . '] ' . $message . "\n", 3, ROOT_DIR . LOG_FILE);
}
}