-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Add Log Viewer to Modern UI #2440
Conversation
Something off about python 3.8? Havent tried it out just yet, but it looks very promising! |
41a1c10
to
2c421ca
Compare
Strange, I'm not sure why Python 3.8 specifically was failing with the last build but seems everything is passing now |
This is already a great improvement, but can we also show unhandled exceptions? For example, if I use an invalid host url ( [2023-10-31 14:53:34,306] svenskaspel.se/INFO/locust.runners: All users spawned: {"QuickstartUser": 1} (1 total users) |
@cyberw How were you able to reproduce this exactly? When I ran this the error would be caught by the locust --modern-ui -f locust.py -H asdfasdf --autostart If we want errors to be captured in a more general sense I believe we would have to do so using |
I set the url in the ui, maybe that is the difference? Or maybe it is because it happened in the on_start method? in that case that is another bug :) Could you have a go at doing it (using app.errorhandler or whatever)? Showing almost all errors in the UI is kinda confusing :) |
571ca82
to
d68a6fc
Compare
app.errorhandler doesnt seem to catch this. Even with that change, I dont see it in the UI. I'm running Traceback (most recent call last): |
If you want, I can investigate it "from the other end" (correctly handling unhandled exceptions in on_start). |
Ah I see the issue, the |
f59b13b
to
8d5d1f4
Compare
@cyberw Adding logs to |
That is an improvement, but not perfect. It will duplicate the error in the console output (which isnt terrible) but more importantly it doesnt handle other types of exceptions happening in on_start. Anyways this isnt really your fault. I can investigate it later on, unless you want to dig deeper. Ok to merge? |
Yeah do you prefer me to remove the last commit before merging? I'd be happy to dig into this more but I think fixing the error handling for the |
Yea, lets remove the commit. It could theoretically cause log spam for someone (if they are catching the exception themselves) |
8d5d1f4
to
d68a6fc
Compare
d68a6fc
to
a6e471e
Compare
I went ahead and fixed it right away :) #2442 |
Nice! Thanks for taking care of that :) |
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [locust](https://togithub.com/locustio/locust) | `==2.18.0` -> `==2.18.1` | [![age](https://developer.mend.io/api/mc/badges/age/pypi/locust/2.18.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/pypi/locust/2.18.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/pypi/locust/2.18.0/2.18.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/pypi/locust/2.18.0/2.18.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>locustio/locust (locust)</summary> ### [`v2.18.1`](https://togithub.com/locustio/locust/releases/tag/2.18.1) [Compare Source](https://togithub.com/locustio/locust/compare/2.18.0...2.18.1) #### What's Changed - Modern UI shows wrong (old) hostname when setting hostname in start dialog by [@​andrewbaldwin44](https://togithub.com/andrewbaldwin44) in [https://github.com/locustio/locust/pull/2436](https://togithub.com/locustio/locust/pull/2436) - Fix for UserClass picker not loading all available Shape Classes by [@​mikenester](https://togithub.com/mikenester) in [https://github.com/locustio/locust/pull/2441](https://togithub.com/locustio/locust/pull/2441) - Add Log Viewer to Modern UI by [@​andrewbaldwin44](https://togithub.com/andrewbaldwin44) in [https://github.com/locustio/locust/pull/2440](https://togithub.com/locustio/locust/pull/2440) - Log unhandled exceptions thrown in User.on_start by [@​cyberw](https://togithub.com/cyberw) in [https://github.com/locustio/locust/pull/2442](https://togithub.com/locustio/locust/pull/2442) **Full Changelog**: locustio/locust@2.18.0...2.18.1 </details> --- ### Configuration 📅 **Schedule**: Branch creation - "after 10pm every weekday,before 6am every weekday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/apereo/cas). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zMS41IiwidXBkYXRlZEluVmVyIjoiMzcuMzEuNSIsInRhcmdldEJyYW5jaCI6Im1hc3RlciJ9-->
Proposal
LogReader
to capture all logsweb.py
to return the logs in JSON format/logs
/logs
and display the outFixes #2437