Commit ef942f6
authored
Remove duplicate exception logged to console during startup failure. (#1664)
## Why make this change?
-Work done as part of structured logging overhaul. #1517
## What is this change?
- Removes one instance where an exception is logged twice:
1. once automatically by dotnet
2. second when we manually include the exception message/stacktrace in
exception handling. [Remove this instance]
-Adds named parameters in ilogger call while making message generation
for the console more concise. ILogger logError() and other ilogger calls
allow you to include a parameter for the exception. That is logged
automatically in ilogger so we don't have to additionally log the
exception message in the logger message manually.
## How was this tested?
manual testing:
before:

after:

## Sample Request(s)
- put a bad entity rest path (all else okay) to trigger startup failure.
i.e. `"path": " /pathName"`1 parent e49d72a commit ef942f6
2 files changed
Lines changed: 8 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
147 | 147 | | |
148 | 148 | | |
149 | 149 | | |
150 | | - | |
151 | | - | |
152 | | - | |
| 150 | + | |
153 | 151 | | |
| 152 | + | |
154 | 153 | | |
155 | 154 | | |
156 | | - | |
157 | | - | |
| 155 | + | |
158 | 156 | | |
159 | 157 | | |
160 | 158 | | |
161 | | - | |
| 159 | + | |
162 | 160 | | |
163 | 161 | | |
164 | 162 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
40 | 40 | | |
41 | | - | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
42 | 44 | | |
43 | 45 | | |
44 | 46 | | |
| |||
0 commit comments