-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
logs: setting --log='file-defaults: {format: json}
does not impact the format of cockroach-stderr.log
#58968
Comments
It's an oddity due to some unfixable problems in the Go runtime system. We need to find a way to drive the idea home that it's not a log file like the others. Meanwhile we can't drive attention away from this file entirely because it does contain useful details sometimes. Maybe we could rename it? |
In any case, the fact it's different must be called out in documentation properly. @thtruo how do you suggest we pick up the special semantics of this file effectively in explanations, etc? |
Ack. Agreed that this should be called out in documentation cc @taroface FYI a good discussion topic That's helpful context @knz. I see your perspective around the need to keep that file in some way. I don't have strong opinions around how we name it, but here's one idea. Perhaps removing the Whether we rename or not, at the very least, we'll have this explained in docs. |
Nvm, my suggestion about removing the Looking at the Sounds like this issue is not really a functional bug but an area for potential user confusion. I'm okay with closing this if you are cc @knz |
I think at this point it is mostly a doc project and there's no clear change engineering-wise. However if we need to make a callout about this in docs, it won't be sufficient to rely on the stream of past release notes. I would recommend creating a specific docs issue instead. |
--log='file-defaults: {format: json}
should result in a json structured cockroach-stderr.log
--log='file-defaults: {format: json}
does not impact the format of cockroach-stderr.log
Ack. Closing this. Tracking the relevant docs issue here cockroachdb/docs#9344 |
Observation
When I run a command like
cockroach start-single-node --certs-dir=certs --log='file-defaults: {format: json}'
to set the logging format tojson
, I notice thatcockroach-stderr.log
continues to be incrdb-v1
format.Expectation
When I run a command like
cockroach start-single-node --certs-dir=certs --log='file-defaults: {format: json}'
, I expectcockroach-stderr.log
to be structured asjson
as well, notcrdb-v1
.Repro steps
cockroach start-single-node --certs-dir=certs --log='file-defaults: {format: json}'
cd
intocockroach-data/
and runtail cockroach.log | jq .
which outputs JSON logs ✅tail cockroach-pebble.log | jq .
which outputs JSON logs ✅tail cockroach-stderr.log | jq .
which does NOT output JSON logs. These logs are incrdb-v1
formatThe text was updated successfully, but these errors were encountered: