ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
logcleaner.php File Reference

Go to the source code of this file.

Functions

if(! $dryrun) printHelp ()
 This function prints the help output. More...
 

Variables

 $baseDir = dirname(dirname(dirname(dirname(__FILE__))))
 
 $configdir = SimpleSAML\Utils\Config::getConfigDir()
 
 $progName = array_shift($argv)
 
 $debug = false
 
 $dryrun = false
 
 $output = '/tmp/simplesamlphp-new.log'
 
 $infile = null
 
foreach($argv as $a) $cleaner = new sspmod_statistics_LogCleaner($infile)
 
 $todelete = $cleaner->clean($debug)
 

Function Documentation

◆ printHelp()

if (! $dryrun) printHelp ( )

This function prints the help output.

Definition at line 75 of file logcleaner.php.

References $progName, input, and Sabre\Event\Loop\run().

75  {
76  global $progName;
77 
78  echo <<<END
79 Usage: $progName [options]
80 
81 This program cleans logs. This script is experimental. Do not run it unless you have talked to Andreas about it.
82 The script deletes log lines related to sessions that produce more than 200 lines.
83 
84 Options:
85  -d, --debug Used when configuring the log file syntax. See doc.
86  --dry-run Aggregate but do not store the results.
87  --infile File input.
88  --outfile File to output the results.
89 
90 END;
91 }
run()
Runs the loop.
Definition: functions.php:130
input
Definition: langcheck.php:166
$progName
Definition: logcleaner.php:14
+ Here is the call graph for this function:

Variable Documentation

◆ $baseDir

$baseDir = dirname(dirname(dirname(dirname(__FILE__))))

Definition at line 5 of file logcleaner.php.

◆ $cleaner

foreach ( $argv as $a) $cleaner = new sspmod_statistics_LogCleaner($infile)

Definition at line 61 of file logcleaner.php.

◆ $configdir

$configdir = SimpleSAML\Utils\Config::getConfigDir()

Definition at line 11 of file logcleaner.php.

◆ $debug

$debug = false

Definition at line 15 of file logcleaner.php.

◆ $dryrun

$dryrun = false

Definition at line 16 of file logcleaner.php.

◆ $infile

$infile = null

Definition at line 18 of file logcleaner.php.

◆ $output

$output = '/tmp/simplesamlphp-new.log'

Definition at line 17 of file logcleaner.php.

◆ $progName

$progName = array_shift($argv)

Definition at line 14 of file logcleaner.php.

Referenced by printHelp().

◆ $todelete

$todelete = $cleaner->clean($debug)