-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapache.php
More file actions
41 lines (30 loc) · 960 Bytes
/
apache.php
File metadata and controls
41 lines (30 loc) · 960 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
32
33
34
35
36
37
38
39
40
<?php
require_once 'vendor/autoload.php';
$start = microtime(true);
set_time_limit(0);
ini_set('memory_limit', '2048M');
$analyzer = new \Tdsereno\HttpdAnalyzer\Analyzer();
//$analyzer->addFile(__DIR__ . '/logs/no_domain_acess.log');
$analyzer->setGroupBy('All Domains Agrouped');
//https://stackoverflow.com/a/30939678/14626048
foreach (glob(__DIR__ . '/logs/*.{*}', GLOB_BRACE) as $filename)
{
$analyzer->addFile($filename);
}
foreach (glob(__DIR__ . '/logs/production/*.{*}', GLOB_BRACE) as $filename)
{
$analyzer->addFile($filename);
}
// \Tdsereno\HttpdAnalyzer\Printer::setAvoidColor(TRUE);
$analyzer->setMaxDepth(10);
//$analyzer->setMinDate('24/Jun/2022:23:30:00 -0300');
//$analyzer->setMaxDate('24/Jun/2022:23:59:00 -0300');
//$analyzer->setFilter('www.myDomain.com.br');
$analyzer->load();
$result = $analyzer->getLogGroup();
/*
print_r($result);
die();*/
$analyzer->print();
$analyzer->printTimer();
$analyzer->printLinesInfo();