docs: add howto configure jubilant logs#2619
Conversation
| uses: actions/upload-artifact@v7 | ||
| with: | ||
| name: juju-dump-logs | ||
| name: integration-test-logs |
There was a problem hiding this comment.
I rename to keep it general, as this artifact now contain both the log file generated by pytest, and the files generated by pytest-jubilant.
dwilding
left a comment
There was a problem hiding this comment.
I haven't finished reviewing, but need to stop for today. Sending my initial comments in case they are helpful.
…ocks; remove mentioning pytest-jubilant usage hints in Default Behaviour; and other minor changes
I removed it by mistake.
|
Commit d69899c assumes the changes from canonical/pytest-jubilant#106. |
tonyandrewmeyer
left a comment
There was a problem hiding this comment.
I didn't follow the PRs to adjust the logging earlier, so I might have missed some discussion here, sorry. Do we want to describe these "Brief" and "Verbose" styles here, and do we refer to them by those names anywhere else? It seems like we are just describing how we'd recommend configuring stream and file output, and the names just make it confusing. But if we are using them elsewhere or they have wider meaning, then that would be different.
I think it would be good to have some example output for each of the cases, so people know what kind of content they should get, particularly with different log levels (the format is just standard logging and should be fairly obvious).
In Jubilant or pytest-jubilant logs do we have somewhere information about what gets logged to each level? If so, it would be good to link to that. If not, maybe this is the place for that, although it seems like it belongs in Jubilant.
|
@tonyandrewmeyer . Thanks for the questions.
Good point. I will add them in. I can reuse the examples in the Spec.
The logs don't contain this information. Or, I assume you are referring to the docs 😅 . We don't have this information anywhere in the docs. |
Yes, sorry!
Agreed. I don't think this makes it an exact promise, and certainly the format is not. But as a user I need some way of deciding what makes it into each level so I can make a sensible choice of level. I think you're right that it should be the type of information rather than specific details. |
|
Calling Brief, Verbose, and Error "logging modes" could be confusing. As you say, those names aren't used anywhere else. How about trying this structure:
|
|
Thank you for the review. @dwilding I have revised the logging level discussion in the docs following your suggested structure. And I think it works extremely well. @tonyandrewmeyer I also added a short description on what is shown in each log level by Jubilant. It's under the new |
dwilding
left a comment
There was a problem hiding this comment.
I added several comments, but all minor. Nice work on this!
tonyandrewmeyer
left a comment
There was a problem hiding this comment.
Thanks for this! Nothing much other than agreeing with David's comments.
dwilding
left a comment
There was a problem hiding this comment.
I looked over the latest version. Great work!
This PR is a follow up from:
This PR add the following content into
howto/write-integration-tests-for-a-charm.md:pyproject.tomlGenerate crash dumpssection to mention the newpytest-jubilantlogger object.There is one small change in
howto/set-up-continuous-integration-for-a-charm.mdbecause it uses the GitHub Action workflow example inhowto/write-integration-tests-for-a-charm.md.