Skip to content

Commit 876c9de

Browse files
RonnyB71Ronny Birkeli
andauthored
Add logging of exception and stacktrace if the Eformidling startup service fails (#78)
Co-authored-by: Ronny Birkeli <ronny.birkeli@digdir.no>
1 parent 7b17429 commit 876c9de

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/Altinn.App.Core/EFormidling/EformidlingStartup.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ public async Task StartAsync(CancellationToken cancellationToken)
3636
_logger.LogInformation("Successfully subscribed to event {eventType} for app {appIdentifier}. Subscription {subscriptionId} is being used.", eventType, _appIdentifier, subscription.Id);
3737
}
3838

39-
catch
39+
catch (Exception ex)
4040
{
41-
_logger.LogError("Unable to subscribe to event {eventType} for app {appIdentifier}", eventType, _appIdentifier);
41+
_logger.LogError("Unable to subscribe to event {eventType} for app {appIdentifier}. Received exception {exceptionMessage} with {stackTrace}", eventType, _appIdentifier, ex.Message, ex.StackTrace);
4242
throw;
4343
}
4444
}

0 commit comments

Comments
 (0)