Skip to content

Commit

Permalink
Include timestamps in sample output
Browse files Browse the repository at this point in the history
  • Loading branch information
josephdecock committed Nov 30, 2023
1 parent 0713f1f commit 6dded81
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion samples/JS8.DPoP/wwwroot/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,8 @@ function log() {
} else if (typeof msg !== 'string') {
msg = JSON.stringify(msg, null, 2);
}
document.getElementById('response').innerText += msg + '\r\n';
var msgWithTimestamp = `${(new Date()).toLocaleTimeString()} - ${msg}`;
document.getElementById('response').innerText += msgWithTimestamp;
});
}

Expand Down
2 changes: 1 addition & 1 deletion samples/JS8.DPoP/wwwroot/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<body>
<div class="container">
<header class="page-header">
<h1>SPA (.NET 8 host)</h1>
<h1>SPA (.NET 8 host using DPoP)</h1>
</header>

<div class="row">
Expand Down
3 changes: 2 additions & 1 deletion samples/JS8/wwwroot/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,8 @@ function log() {
} else if (typeof msg !== 'string') {
msg = JSON.stringify(msg, null, 2);
}
document.getElementById('response').innerText += msg + '\r\n';
var msgWithTimestamp = `${(new Date()).toLocaleTimeString()} - ${msg}`;
document.getElementById('response').innerText += msgWithTimestamp;
});
}

Expand Down

0 comments on commit 6dded81

Please sign in to comment.