Example of a log at a particular "level" (in this case, "error")
()
| 102 | |
| 103 | // Example of a log at a particular "level" (in this case, "error") |
| 104 | func ExampleError() { |
| 105 | setup() |
| 106 | log.Error().Msg("hello world") |
| 107 | |
| 108 | // Output: {"level":"error","time":1199811905,"message":"hello world"} |
| 109 | } |
| 110 | |
| 111 | // Example of a log at a particular "level" (in this case, "fatal") |
| 112 | func ExampleFatal() { |