Commit 2fff3f3
committed
common: increase robustness of access log file
Motivaition:
The information about HTTP-based requests (WebDAV and REST) are only
logged in the access log file when the request has been processed.
Currently, this logging only happens if the request is handled normally;
i.e., no exception was thrown and (for async requests) the processing
didn't take too long.
This means that a request that triggers certain failure modes would not
have an entry in the access log file.
Modification:
Update existing `requestCompleted` method to accept a `NetLoggerBuilder`
consumer. This consumer should add any mode-specific additional logging
information.
Create methods that handle the three modes in which the processing of a
request might finish: `requestCompletedNormally`,
`requestCompletedExceptionally`, `requestTimedOut`. All three modes add
mode-specific information to the access log entry.
The access log entry key-value pairs derived from the response are moved
to the `requestCompletedNormally` method. The other modes will use
default responses, rendering this information unreliable in those cases.
The async listener `LogOnComplete` is updated so that `onTimeout` and
`onError` event notification trigger `requestTimedOut` and
`requestCompletedExceptionally` logging, respectively.
The `NetLoggerBuilder` class is updated to accept key-value pairs where
the value has type Duration.
Result:
Fix bug where webdav and frontend door access log files would fail to
log requests that trigger certain failures in dCache.
Target: master
Requires-notes: yes
Requires-book: no
Request: 11.1
Request: 11.0
Request: 10.2
Request: 10.1
Request: 10.0
Request: 9.2
Closes: #7939
Patch: https://rb.dcache.org/r/14581/
Acked-by: Tigran Mkrtchyan1 parent 361f98b commit 2fff3f3
File tree
2 files changed
+58
-13
lines changed- modules
- cells/src/main/java/org/dcache/util
- dcache/src/main/java/org/dcache/http
2 files changed
+58
-13
lines changedLines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
242 | 243 | | |
243 | 244 | | |
244 | 245 | | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
245 | 250 | | |
246 | 251 | | |
247 | 252 | | |
| |||
Lines changed: 53 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
29 | 30 | | |
| 31 | + | |
30 | 32 | | |
31 | 33 | | |
32 | 34 | | |
| |||
43 | 45 | | |
44 | 46 | | |
45 | 47 | | |
| 48 | + | |
| 49 | + | |
46 | 50 | | |
47 | 51 | | |
48 | 52 | | |
| |||
61 | 65 | | |
62 | 66 | | |
63 | 67 | | |
64 | | - | |
65 | | - | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
66 | 71 | | |
67 | 72 | | |
68 | 73 | | |
69 | 74 | | |
70 | | - | |
71 | | - | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
72 | 80 | | |
73 | 81 | | |
74 | 82 | | |
75 | 83 | | |
76 | | - | |
77 | | - | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
78 | 91 | | |
79 | 92 | | |
80 | 93 | | |
81 | 94 | | |
82 | | - | |
| 95 | + | |
83 | 96 | | |
84 | 97 | | |
85 | 98 | | |
| |||
107 | 120 | | |
108 | 121 | | |
109 | 122 | | |
110 | | - | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
111 | 133 | | |
112 | 134 | | |
113 | 135 | | |
114 | 136 | | |
115 | | - | |
| 137 | + | |
116 | 138 | | |
117 | 139 | | |
118 | 140 | | |
119 | 141 | | |
120 | | - | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
121 | 163 | | |
122 | 164 | | |
123 | 165 | | |
| |||
127 | 169 | | |
128 | 170 | | |
129 | 171 | | |
| 172 | + | |
130 | 173 | | |
131 | 174 | | |
132 | 175 | | |
| |||
135 | 178 | | |
136 | 179 | | |
137 | 180 | | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | 181 | | |
142 | 182 | | |
143 | 183 | | |
| |||
0 commit comments