Commit 225c641
committed
Handle nil @syslog in syslog sink add_record
After resetting @syslog to nil between tests, some tests that use the
syslog sink without calling open() first would fail with:
"undefined method `log' for nil"
Add a guard clause to return early if @syslog is nil, preventing errors
when the sink hasn't been properly opened yet. This is a defensive check
that allows the sink to gracefully handle uninitialized state.1 parent d434260 commit 225c641
2 files changed
+2
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| 38 | + | |
38 | 39 | | |
39 | 40 | | |
40 | 41 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
207 | 207 | | |
208 | 208 | | |
209 | 209 | | |
210 | | - | |
211 | | - | |
212 | | - | |
| 210 | + | |
213 | 211 | | |
214 | 212 | | |
215 | 213 | | |
| |||
0 commit comments