1const styles = { 2 trace: 'color: #EE38FF; font-weight: lighter;', // purple 3 debug: 'color: #4CFF00; font-weight: normal;', // green 4 info: 'color: #82FFFF; font-weight: bold;', // light blue 5 warn: 'color: orange; font-weight: bold;', 6 error: 'color: red; font-weight: bold; background: #fee;', 7 critical: 'color: white; font-weight: bold; background: red;', 8}; 9 10export function logTrace(message, optionalParams) { 11 console.debug(`%c[TRACE] ${message}`, styles.trace, ...(optionalParams ?? [])); 12} 13 14export function logDebug(message, optionalParams) { 15 console.debug(`%c[DEBUG] ${message}`, styles.debug, ...(optionalParams ?? [])); 16} 17 18export function logInfo(message, optionalParams) { 19 console.info(`%c[INFO ] ${message}`, styles.info, ...(optionalParams ?? [])); 20} 21 22export function logWarn(message, optionalParams) { 23 console.warn(`%c[WARN ] ${message}`, styles.warn, ...(optionalParams ?? [])); 24} 25 26export function logError(message, optionalParams) { 27 console.error(`%c[ERROR] ${message}`, styles.error, ...(optionalParams ?? [])); 28} 29 30export function logCritical(message, optionalParams) { 31 console.error(`%c[FATAL] ${message}`, styles.critical, ...(optionalParams ?? [])); 32} 33 34export function group(name) { 35 console.group(`%c${name}`, 'font-weight:bold;'); 36} 37 38export function groupEnd() { 39 console.groupEnd(); 40} 41 42export function time(name) { 43 console.time(name); 44} 45 46export function timeEnd(name) { 47 console.timeEnd(name); 48}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.