SetLogJSONFormatter configures the active backend to output JSON. For zerolog this is a no-op since JSON is the default format.
()
| 161 | // SetLogJSONFormatter configures the active backend to output JSON. |
| 162 | // For zerolog this is a no-op since JSON is the default format. |
| 163 | func SetLogJSONFormatter() { |
| 164 | if getBackend() == LogBackendZerolog { |
| 165 | setZerologJSONFormatter() |
| 166 | return |
| 167 | } |
| 168 | setLogrusJSONFormatter() |
| 169 | } |
| 170 | |
| 171 | // SetLogOutput sets the output writer for the active backend. |
| 172 | // This is primarily useful for testing (capturing log output). |