-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCombinedFormatDescriptor.php
34 lines (29 loc) · 1.08 KB
/
CombinedFormatDescriptor.php
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
32
33
34
<?php
namespace phpWTL;
use phpWTL\CommonFormatDescriptor;
require_once 'CommonFormatDescriptor.php';
/**
* Format descriptor for the combined log format (see: https://httpd.apache.org/docs/1.3/logs.html#combined).
*
* @author Michael Beyer <[email protected]>
* @version v0.1.0
* @api
*/
class CombinedFormatDescriptor extends CommonFormatDescriptor {
/**
* Set format prefix and create all additional format field descriptors in their proper sequence (array of DescriptorField objects):
*
* referrer, user_agent
* (appended to and in addition to those of common: host_ip, client_identity, user_id, timestamp, request_line, status_code, content-size)
*
* @author Michael Beyer <[email protected]>
* @version v0.1.0
*/
protected function __construct() {
parent::__construct();
static::$formatPrefix= "combined_";
array_push(static::$formatFields, new DescriptorField(array('name' => 'referrer', 'prefix' => '"', 'suffix' => '"')));
array_push(static::$formatFields, new DescriptorField(array('name' => 'user_agent', 'prefix' => '"', 'suffix' => '"')));
}
}
?>