Skip to content

Commit 2320d08

Browse files
committed
Add netstack.js to make exception stack tarce more readable.
1 parent 4e3df85 commit 2320d08

File tree

7 files changed

+60
-6
lines changed

7 files changed

+60
-6
lines changed

src/Serilog.Ui.Web/bundleconfig.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,11 @@
2222
"inputFiles": [
2323
"wwwroot/dist/main.js"
2424
]
25+
},
26+
{
27+
"outputFileName": "wwwroot/dist/netstack.min.js",
28+
"inputFiles": [
29+
"wwwroot/dist/netstack.js"
30+
]
2531
}
2632
]

src/Serilog.Ui.Web/wwwroot/dist/main.css

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -390,4 +390,41 @@ a[data-toggle="collapse"] {
390390
#submit {
391391
cursor: pointer;
392392
vertical-align: text-top;
393-
}
393+
}
394+
395+
pre.stacktrace {
396+
background-color: #333;
397+
color: #ffffff;
398+
padding-left: 5px;
399+
}
400+
401+
pre.stacktrace .st-type {
402+
color: #0a8472;
403+
font-weight: bolder;
404+
}
405+
406+
pre.stacktrace .st-method {
407+
color: #70c9ba;
408+
font-weight: bolder;
409+
}
410+
411+
pre.stacktrace .st-frame-params {
412+
color: #ffffff;
413+
font-weight: normal;
414+
}
415+
416+
pre.stacktrace .st-param-type {
417+
color: #0a8472;
418+
}
419+
420+
pre.stacktrace .st-param-name {
421+
color: #ffffff;
422+
}
423+
424+
pre.stacktrace .st-file {
425+
color: #f8b068;
426+
}
427+
428+
pre.stacktrace .st-line {
429+
color: #ff4f68;
430+
}

src/Serilog.Ui.Web/wwwroot/dist/main.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@
5858

5959
modalBody.find("pre").text(message);
6060
modal.modal("show");
61+
$('.stacktrace').netStack({
62+
prettyprint: true
63+
});
6164
});
6265

6366
$("#saveJwt").on("click", function () {

src/Serilog.Ui.Web/wwwroot/dist/main.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Serilog.Ui.Web/wwwroot/dist/main.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)