From: Gilles Dubuc Date: Mon, 20 Jul 2015 17:59:36 +0000 (+0200) Subject: Log thumbnail access X-Git-Tag: 1.31.0-rc.0~10703^2 X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dcompta/comptes/journal.php?a=commitdiff_plain;h=87861302440b425dca6b1e3ef55ebd3bf9a2497c;p=lhc%2Fweb%2Fwiklou.git Log thumbnail access Bug: T106323 Change-Id: Iddd4201b13a31f441c6d25bcde6564b643cefdb4 --- 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; }