Skip to content

Commit 0197695

Browse files
committed
fix logging from previous
1 parent be04bbd commit 0197695

File tree

4 files changed

+11
-10
lines changed

4 files changed

+11
-10
lines changed

public/docs/common_index.js.html

+5-2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
* @file common/index.ts
66
* @namespace common
77
*/
8+
var _a;
89
var LogTone;
910
(function (LogTone) {
1011
LogTone["Log"] = "log";
@@ -47,7 +48,7 @@
4748
* @example _log("Hello world!");
4849
* */
4950
function _log(...args) {
50-
log.push({ time: Date.now(), message: arguments[0], type: tone || LogTone.Log });
51+
log.push({ time: Date.now(), message: arguments[0], type: this || LogTone.Log });
5152
if (arguments.length == 0)
5253
return;
5354
// check for very large messages and warn them in the console with the first 100 characters (make sure this catches the message, even if it's not the first argument, or in a object format)
@@ -140,8 +141,10 @@
140141
* */
141142
const _statuslog = _log.bind(LogTone.Info);
142143
try {
143-
window._status = _status;
144+
const version = ((_a = document.getElementById("version")) === null || _a === void 0 ? void 0 : _a.textContent) || "< not found >";
145+
_status.debug(`🚀 Loaded into ${process.env.NODE_ENV} build @ version [${version}]`);
144146
_status.log("📜 Initialized logger");
147+
window._status = _status;
145148
}
146149
catch (err) {
147150
_status.log("⚠ Couldn't set window._status", err);

0 commit comments

Comments
 (0)