-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
server: Logs are not always output as json when configured to do so #11232
Comments
Thanks for flagging this us @josegonzalez. I tracked down the lines you sent to here https://github.com/hashicorp/mdns/blob/master/client.go#L120 and here https://github.com/hashicorp/consul-template/blob/master/manager/runner.go#L176. As you can notice, they both use The Consul team has been working on Finding and refactoring other dependencies may be tricky though. I wonder if there's a way we could capture everything the Nomad process would try to write to stdout and filter out non-JSON lines 🤔 |
I think just starting with changing what is in this issue would be a good start, and if there are other locations found in the future, changing those then would be fine? |
The problem is that these changes are not in Nomad, but in external libraries, and changing how libraries log messages usually affects most of the code base. Some of this work is already being done, such as in the case of What Nomad could do is what I mentioned, which is to filter out, or wrap non-JSON messages. But this could have a performance impact since it would touch every log message, so we will need to scope and investigate this further. |
That makes sense. Is there some way I can help push this issue forward? |
It turns out that #11291 changes the way it's used so that messages are properly wrapped. Thanks for reporting this! |
I'm going to lock this issue because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active issues. |
Nomad version
Operating system and Environment details
Issue
Setting
log_json = true
still results in certain log messages being sent in non-json format.Reproduction steps
log_json = true
in configretry_join
in config. I used"provider=mdns service=nomad v6=false"
Expected Result
Json logging format for everything.
Actual Result
Some messages are not in json:
Job file (if appropriate)
N/A
Nomad Server logs (if appropriate)
Startup logs:
Nomad Client logs (if appropriate)
N/A
The text was updated successfully, but these errors were encountered: