mirror of
https://github.com/KubaPro010/fm-dx-webserver.git
synced 2026-07-30 00:39:16 +02:00
oh how much did i MISS 3las, i surely LOVE firefox and its compatiblity (might as well switch to fucking ie)
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
/*
|
||||
Logging is part of 3LAS (Low Latency Live Audio Streaming)
|
||||
https://github.com/JoJoBond/3LAS
|
||||
*/
|
||||
var Logging = /** @class */ (function () {
|
||||
function Logging(parentElement, childElementType) {
|
||||
this.ParentElement = parentElement;
|
||||
this.ChildElementType = childElementType;
|
||||
}
|
||||
Logging.prototype.Log = function (message) {
|
||||
var dateTime = new Date();
|
||||
var lineText = "[" + (dateTime.getHours() > 9 ? dateTime.getHours() : "0" + dateTime.getHours()) + ":" +
|
||||
(dateTime.getMinutes() > 9 ? dateTime.getMinutes() : "0" + dateTime.getMinutes()) + ":" +
|
||||
(dateTime.getSeconds() > 9 ? dateTime.getSeconds() : "0" + dateTime.getSeconds()) +
|
||||
"] " + message;
|
||||
if (this.ParentElement && this.ChildElementType) {
|
||||
var line = document.createElement(this.ChildElementType);
|
||||
line.innerText = lineText;
|
||||
this.ParentElement.appendChild(line);
|
||||
}
|
||||
else {
|
||||
//console.log(lineText);
|
||||
}
|
||||
};
|
||||
return Logging;
|
||||
}());
|
||||
Reference in New Issue
Block a user