-
Notifications
You must be signed in to change notification settings - Fork 26
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
Format events as json #13
Comments
Can you give a concrete example? One way how this might be achieved is using the new (in 0.2) |
We are using structured logging and have other systems which will expect certain fields to exist so I would like to validate we were really generating them in the expected JSON object structure. I think |
I could have been more helpful and linked to As well as injecting the As an alternative to a macro option I think a crate level feature would be ok too if that simplifies things |
I'd welcome a generic solution that switches internal log record storage to a more structured format (i.e. #5). I think with that, we wouldn't need a JSON option, because it would already allow accessing structured fields. This might be implemented through JSON though. If all structured records would be accessible when doing assertions against logs, would that solve the issue for you? If yes, would you be OK with closing this issue in favor of #5? |
Yes, I think I could live with that. I'd like to be able to test the serialisation side of things, but that could as well be separate/unrelated test. |
I'd like to be able to make assertions about the contents of the logging when encoded to json. Would it be possible to support this? Perhaps
#[traced_test(json)]
or something like that could be made to work?Might be a bit related to #5?
The text was updated successfully, but these errors were encountered: