Commit 2a217c3
committed
Coordinate emit_log_hook and all log destinations to share the same timeval
This would cause the timestamp values used by emit_log_hook and all the
other log destinations to differ, because the timestamps are reset
before sending the logs to the server and after calling the hook.
This change matters for emit_log_hook when generating log information
with 'n' or 'm' in log_line_prefix through log_status_format(), or when
doing direct calls to get_formatted_log_time() like in the JSON or CSV
log formats.
While on it, this commit fixes a couple of comments related to the
formatted timestamps where the JSON was not mentioned. Oversight in
dc68668, that I have noticed while reviewing this patch.
Author: Kambam Vinay, Michael Paquier
Discussion: https://postgr.es/m/CANiRfmsK36A0i8mnQtzaxhSm3CUCimPwJPp4WQNq53OdSNkgWg@mail.gmail.com1 parent 44086b0 commit 2a217c3
1 file changed
+11
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
154 | 154 | | |
155 | 155 | | |
156 | 156 | | |
157 | | - | |
| 157 | + | |
158 | 158 | | |
159 | 159 | | |
160 | 160 | | |
| |||
1678 | 1678 | | |
1679 | 1679 | | |
1680 | 1680 | | |
| 1681 | + | |
| 1682 | + | |
| 1683 | + | |
| 1684 | + | |
| 1685 | + | |
| 1686 | + | |
| 1687 | + | |
| 1688 | + | |
1681 | 1689 | | |
1682 | 1690 | | |
1683 | 1691 | | |
| |||
2632 | 2640 | | |
2633 | 2641 | | |
2634 | 2642 | | |
2635 | | - | |
| 2643 | + | |
2636 | 2644 | | |
2637 | 2645 | | |
2638 | 2646 | | |
| |||
2673 | 2681 | | |
2674 | 2682 | | |
2675 | 2683 | | |
2676 | | - | |
| 2684 | + | |
2677 | 2685 | | |
2678 | 2686 | | |
2679 | 2687 | | |
| |||
3151 | 3159 | | |
3152 | 3160 | | |
3153 | 3161 | | |
3154 | | - | |
3155 | | - | |
3156 | | - | |
3157 | 3162 | | |
3158 | 3163 | | |
3159 | 3164 | | |
| |||
0 commit comments