29use Wikimedia\ObjectFactory;
30use Wikimedia\Timestamp\ConvertibleTimestamp;
56 $this->backend = $config[
'backend'];
57 $this->ttlDays = $config[
'ttlDays'] ??
false;
72 $jrn = ObjectFactory::getObjectFromSpec(
74 [
'specIsArg' =>
true,
'assertClass' => __CLASS__ ]
87 for ( $i = 0; $i < 5; $i++ ) {
88 $s .= mt_rand( 0, 2147483647 );
90 $s = Wikimedia\base_convert( sha1(
$s ), 16, 36, 31 );
92 $timestamp = ConvertibleTimestamp::convert( TS_MW, time() );
94 return substr(
Wikimedia\base_convert( $timestamp, 10, 36, 9 ) .
$s, 0, 31 );
109 if ( $entries === [] ) {
110 return StatusValue::newGood();
177 if ( $limit && count( $entries ) > $limit ) {
178 $last = array_pop( $entries );
wfDeprecated( $function, $version=false, $component=false, $callerOffset=2)
Logs a warning that a deprecated feature was used.
Class for handling file operation journaling.
logChangeBatch(array $entries, $batchId)
Log changes made by a batch file operation.
__construct(array $config)
Construct a new instance from configuration.
getPositionAtTime( $time)
Get the position ID of the latest journal entry at some point in time.
getCurrentPosition()
Get the position ID of the latest journal entry.
purgeOldLogs()
Purge any old log entries.
doGetChangeEntries( $start, $limit)
getTimestampedUUID()
Get a statistically unique ID string.
getChangeEntries( $start=null, $limit=0, &$next=null)
Get an array of file change log entries.
static factory(array $config, $backend)
Create an appropriate FileJournal object from config.
doLogChangeBatch(array $entries, $batchId)
doGetPositionAtTime( $time)
foreach( $mmfl['setupFiles'] as $fileName) if($queue) if(empty( $mmfl['quiet'])) $s