You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But this add the information in the worst place - before the log message:
2024-10-22T16:15:37.201+0530 INFO dractions/actions.go:115 enter Failover appset-deploy-cephfs-busybox
2024-10-22T16:15:37.273+0530 INFO dractions/retry.go:67 drpc appset-deploy-cephfs-busybox is ready
2024-10-22T16:15:37.432+0530 INFO dractions/actions.go:187 update drpc appset-deploy-cephfs-busybox failover to rdr-dr1
The most impport part of the log is the message, not the location of the call. If you want to find the log line in the code, having a file:line is useful, but it does not mean this info must come before the message.
This also make the log much harder to read because the way the fileds are separated by tabs. If we put the info at the end, the log is nicely indented:
2024-10-22T16:15:37.201+0530 INFO enter Failover appset-deploy-cephfs-busybox dractions/actions.go:115
2024-10-22T16:15:37.273+0530 INFO drpc appset-deploy-cephfs-busybox is ready dractions/retry.go:67
2024-10-22T16:15:37.432+0530 INFO update drpc appset-deploy-cephfs-busybox failover to rdr-dr1 dractions/actions.go:187
Or maybe add the info as a key value pair at the end, the same way other key-value pairs are added:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
It easy to add file:line info using:
But this add the information in the worst place - before the log message:
The most impport part of the log is the message, not the location of the call. If you want to find the log line in the code, having a file:line is useful, but it does not mean this info must come before the message.
This also make the log much harder to read because the way the fileds are separated by tabs. If we put the info at the end, the log is nicely indented:
Or maybe add the info as a key value pair at the end, the same way other key-value pairs are added:
Do we have a way to control the order?
Beta Was this translation helpful? Give feedback.
All reactions