MustSetContextTemplate configures contextual fields and panics if the format cannot be parsed.
(config ContextConfig)
| 125 | |
| 126 | // MustSetContextTemplate configures contextual fields and panics if the format cannot be parsed. |
| 127 | func MustSetContextTemplate(config ContextConfig) { |
| 128 | if err := SetContextTemplate(config); err != nil { |
| 129 | panic(err) |
| 130 | } |
| 131 | } |
| 132 | |
| 133 | // RegisterContextTag registers a contextual tag that can be used by SetContextTemplate. |
| 134 | // Re-registering a tag replaces the existing tag function. Registration is package-global; |