From 87861302440b425dca6b1e3ef55ebd3bf9a2497c Mon Sep 17 00:00:00 2001 From: Gilles Dubuc Date: Mon, 20 Jul 2015 19:59:36 +0200 Subject: [PATCH] Log thumbnail access Bug: T106323 Change-Id: Iddd4201b13a31f441c6d25bcde6564b643cefdb4 --- includes/filerepo/file/File.php | 2 ++ thumb.php | 1 + 2 files changed, 3 insertions(+) diff --git a/includes/filerepo/file/File.php b/includes/filerepo/file/File.php index f9e1128a8e..72b3ae9d81 100644 --- a/includes/filerepo/file/File.php +++ b/includes/filerepo/file/File.php @@ -1149,6 +1149,8 @@ abstract class File implements IDBAccessObject { Hooks::run( 'FileTransformed', array( $this, $thumb, $tmpThumbPath, $thumbPath ) ); } + wfDebugLog( 'thumbnailaccess', time() . ' ' . $thumbPath . ' ' . filesize( $tmpThumbPath ) . ' Generated ' ); + return $thumb; } diff --git a/thumb.php b/thumb.php index 5c4eea7449..3b7ff43612 100644 --- a/thumb.php +++ b/thumb.php @@ -309,6 +309,7 @@ function wfStreamThumb( array $params ) { wfThumbError( 500, 'Could not stream the file' ); } else { RequestContext::getMain()->getStats()->timing( 'media.thumbnail.stream', $streamtime ); + wfDebugLog( 'thumbnailaccess', time() . ' ' . $thumbPath . ' ' . ob_get_length() . ' Streamed ' ); } return; } -- 2.20.1