This repository has been archived on 2024-11-28. You can view files and clone it, but cannot push or open issues or pull requests.
Incam_SGD/resources/js/taillog.js

21 lines
557 B
JavaScript

/*
// once site is in production, rather use:
function simpleLog(severity, item) { ; }
*/
// inline logger
function simpleLog(severity,item) {
var logTable = getElement('brad-log');
if (logTable == null) return ;
// we have a table, do the log.
newRow = createDOM('TR', {'class':'logtable','valign':'top'},
TD({'class':'severity-'+severity}, severity),
TD({'class':'timestamp'},toISOTime(new Date())),
TD({'class':'explanation'}, item)
);
logTable.getElementsByTagName('tbody')[0].appendChild(newRow);
}