Automattic\WooCommerce\Internal\PushNotifications\DataStores
StepLogFileReader::build_filename
Builds a log filename the way the file handler does when writing.
Method of the class: StepLogFileReader{}
No Hooks.
Returns
string.
Usage
$result = StepLogFileReader::build_filename( $source, ?int $rotation, $day ): string;
- $source(string) (required)
- The log source.
- ?int $rotation(required)
- .
- $day(int) (required)
- A timestamp within the UTC day.
StepLogFileReader::build_filename() StepLogFileReader::build filename code WC 11.3.0
private static function build_filename( string $source, ?int $rotation, int $day ): string {
$file_id = File::generate_file_id( $source, $rotation, $day );
return $file_id . '-' . File::generate_hash( $file_id ) . '.log';
}