mirror of
https://github.com/bugsink/bugsink.git
synced 2025-12-21 13:00:13 -06:00
Show logentries in the UI
This commit is contained in:
@@ -49,6 +49,19 @@
|
||||
|
||||
{% endfor %}
|
||||
|
||||
|
||||
{% if parsed_data.logentry %}
|
||||
|
||||
<h1 class="text-3xl mt-4">{{ parsed_data.logentry.formatted }}</h1>
|
||||
<div>this is a log entry (I intend to make this clear in some other way)</div>
|
||||
|
||||
{% if parsed_data.logger %}
|
||||
Emitted by {{ parsed_data.logger }}
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
|
||||
Issue grouper: <span class="font-mono whitespace-pre">"{{ issue_grouper }}"</span>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -14,7 +14,17 @@ def event_detail(request, pk):
|
||||
|
||||
# sentry/glitchtip have some code here to deal with the case that "values" is not present, and exception itself is
|
||||
# the list of exceptions, but we don't aim for endless backwards compat (yet) so we don't.
|
||||
exceptions = parsed_data["exception"]["values"]
|
||||
exceptions = parsed_data["exception"]["values"] if "exception" in parsed_data else None
|
||||
|
||||
if parsed_data["logentry"]:
|
||||
logentry = parsed_data["logentry"]
|
||||
if "formatted" not in logentry:
|
||||
# TODO this is just a wild guess"
|
||||
if "message" in logentry:
|
||||
if "params" not in logentry:
|
||||
logentry["formatted"] = logentry["message"]
|
||||
else:
|
||||
logentry["formatted"] = logentry["message"].format(logentry["params"])
|
||||
|
||||
return render(request, "events/event_detail.html", {
|
||||
"obj": obj,
|
||||
|
||||
Reference in New Issue
Block a user