elastic / elastic/docs

Compile error for golang ECS logging

Open
#3,037 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Ruby
Stars
265
Forks
347
Avg merge
3d 15h
Merged PRs (30d)
2

Description

At the link https://www.elastic.co/guide/en/ecs-logging/go-zerolog/current/setup.html, I run the example code:

```
// Add custom fields.
log.Info().Msg("hello world").Str("custom", "foo")
```

it gives me the following error:

`log.Info().Msg("hello world") (no value) used as value or type`

I need to change it to:

`log.Info().Str("custom", "foo").Msg("Hello, World!")
`
to make it work by referring https://github.com/rs/zerolog

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.