-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDevLogger.php
More file actions
31 lines (29 loc) · 828 Bytes
/
Copy pathDevLogger.php
File metadata and controls
31 lines (29 loc) · 828 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<?php
namespace CleantalkSP\Common\Helpers;
/**
* Class DevLogger
* Base logger class intended to be extended.
* Child classes should override the write() method to implement custom logging behavior.
*
* @package CleantalkSP\Common\Helpers
* @author Cleantalk team (welcome@cleantalk.org)
* @copyright (C) CleanTalk team (http://cleantalk.org)
* @license GNU/GPL: http://www.gnu.org/copyleft/gpl.html
* @see https://github.com/CleanTalk/security-malware-firewall
*/
class DevLogger
{
public static function write($msg, $context = null)
{
if ( ! is_string($msg) ) {
return;
}
if ( ! function_exists('error_log') ) {
return;
}
/**
* @psalm-suppress ForbiddenCode
*/
error_log($msg);
}
}