File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ ## 2.1.5 - 19 December 2019
2+ - \# 9 Record the originally requested image URL when logging errors
3+
14## 2.1.4 - 9 October 2019
25- \# 8 Replace GetFileInfo() with faster FileInfo() if using Lucee
36
Original file line number Diff line number Diff line change 11component {
22
3- variables .version = " 2.1.4 " ;
3+ variables .version = " 2.1.5 " ;
44 variables .isACF = ( server .coldfusion .productname IS " ColdFusion Server" );
55 variables .isLucee = ( server .coldfusion .productname IS " Lucee" );
66
@@ -77,14 +77,20 @@ component{
7777 return sendImage ( cachedFilePath , mimeType );
7878 }
7979 catch ( any exception ){
80+ if ( config .logErrors OR config .writeLogs ){
81+ var errorLogText = " AI Error" ;
82+ if ( arguments .KeyExists ( " originalUrl" ) )
83+ errorLogText & = " serving #arguments .originalUrl #" ;
84+ errorLogText & = " : " ;
85+ }
8086 if ( ! DirectoryExists ( cacheFolderPath ) OR ! FileExists ( cachedFilePath ) ){
8187 if ( config .logErrors OR config .writeLogs )
82- WriteLog ( file : config .logFilename , text : " AI: Error Occured : cached image should exist according to FO cache but is missing. Clearing FO cache." );
88+ WriteLog ( file : config .logFilename , text : errorLogText & " cached image should exist according to FO cache but is missing. Clearing FO cache." );
8389 clearFileOperationsCache ();
8490 }
8591 else {
8692 if ( config .logErrors OR config .writeLogs )
87- WriteLog ( file : config .logFilename , text : " AI: Error Occured : # exception .message # " );
93+ WriteLog ( file : config .logFilename , text : errorLogText & exception .message );
8894 cfheader ( statuscode : " 503" , statustext : " Temporary problem" );
8995 abort ;
9096 }
You can’t perform that action at this time.
0 commit comments