FRED™
3.0
FRED™: Framework for Rapid and Easy Development
Http.php
Go to the documentation of this file.
1
<?php
2
3
namespace
Rsi\Fred\Log\Handler
;
4
5
class
Http
extends
\Rsi\Fred\Log\Handler{
6
7
public
$endpoint
= null;
8
public
$timeout
= 1;
9
10
public
function
add
($prio,$message,$context){
11
if
($this->endpoint) file_get_contents($this->endpoint,0,stream_context_create([
'http'
=> [
12
'method'
=>
'POST'
,
13
'header'
=>
'Content-Type: application/x-www-form-urlencoded'
,
14
'content'
=> http_build_query(compact(
'prio'
,
'message'
,
'context'
) + [
'time'
=> time()]),
15
'timeout'
=> $this->timeout
16
]]));
17
}
18
19
}
Rsi\Fred\Log\Handler\Http\$endpoint
$endpoint
Definition:
Http.php:7
Rsi\Fred\Log\Handler\Http
Definition:
Http.php:5
Rsi\Fred\Log\Handler\Http\add
add($prio, $message, $context)
Definition:
Http.php:10
Rsi\Fred\Log\Handler
Definition:
Console.php:3
Rsi\Fred\Log\Handler\Http\$timeout
$timeout
Definition:
Http.php:8
src
Rsi
Fred
Log
Handler
Http.php
Generated on Sun Aug 2 2020 19:43:57 for FRED™ by
1.8.13