File tree Expand file tree Collapse file tree 2 files changed +19
-3
lines changed
src/WebJobs.Script.WebHost Expand file tree Collapse file tree 2 files changed +19
-3
lines changed Original file line number Diff line number Diff line change 14
14
- Update custom handlers to support trigger return values (#8874 )
15
15
- Send Workerwarmup request to warm up the worker code path before specialization (#9018 )
16
16
- Update PowerShell Worker 7.2 to 4.0.2673 [ Release Note] ( https://github.com/Azure/azure-functions-powershell-worker/releases/tag/v4.0.2673 )
17
+ - Add error details to RunFromPackage failure log (#9094 )
17
18
18
- ** Release sprint:** Sprint 138
19
- [ [ bugs] ( https://github.com/Azure/azure-functions-host/issues?q=is%3Aissue+milestone%3A%22Functions+Sprint+138 %22+label%3Abug+is%3Aclosed ) | [ features] ( https://github.com/Azure/azure-functions-host/issues?q=is%3Aissue+milestone%3A%22Functions+Sprint+138 %22+label%3Afeature+is%3Aclosed ) ]
19
+ ** Release sprint:** Sprint 139
20
+ [ [ bugs] ( https://github.com/Azure/azure-functions-host/issues?q=is%3Aissue+milestone%3A%22Functions+Sprint+139 %22+label%3Abug+is%3Aclosed ) | [ features] ( https://github.com/Azure/azure-functions-host/issues?q=is%3Aissue+milestone%3A%22Functions+Sprint+139 %22+label%3Afeature+is%3Aclosed ) ]
Original file line number Diff line number Diff line change @@ -200,9 +200,24 @@ private void CheckFileSystem()
200
200
// Check for marker file indicating a zip package failure, and if found stop the application.
201
201
// We never want to run with an incorrect file system.
202
202
string path = Path . Combine ( _applicationHostOptions . CurrentValue . ScriptPath , ScriptConstants . RunFromPackageFailedFileName ) ;
203
+
203
204
if ( File . Exists ( path ) )
204
205
{
205
- _logger . LogError ( $ "Shutting down host due to presence of { path } ") ;
206
+ string errorPrefix = $ "Shutting down host due to presence of { path } .";
207
+ string errorSuffix = string . Empty ;
208
+ try
209
+ {
210
+ string fileContent = File . ReadAllText ( path ) ;
211
+ errorSuffix = $ " File content: { fileContent } ";
212
+ }
213
+ catch ( Exception ex )
214
+ {
215
+ errorSuffix = $ " Error reading { ScriptConstants . RunFromPackageFailedFileName } file content: { ex . Message } ";
216
+ }
217
+ finally
218
+ {
219
+ _logger . LogError ( errorPrefix + errorSuffix ) ;
220
+ }
206
221
_applicationLifetime . StopApplication ( ) ;
207
222
}
208
223
}
You can’t perform that action at this time.
0 commit comments