@bracketed/logger
Version:
An alternative to your run-of-the-mill node console logging functions!
4 lines • 673 B
JavaScript
import {a}from'../chunk-QWPVIX2T.mjs';import {LoggerStyle}from'../Style/Style.mjs';import {LoggerTimestamp}from'../Utilities/Timestamp.mjs';var i=class{static{a(this,"LoggerLevel");}timestamp;infix;message;constructor(s={}){this.timestamp=s.timestamp===null?null:new LoggerTimestamp(s.timestamp),this.infix=s.infix??"",this.message=s.message===null?null:new LoggerStyle(s.message);}run(s){let e=(this.timestamp?.run()??"")+this.infix;if(e.length){let r=this.message?m=>e+this.message.run(m):m=>e+m;return s.split(`
`).map(r).join(`
`)}return this.message?this.message.run(s):s}};export{i as LoggerLevel};//# sourceMappingURL=Level.mjs.map
//# sourceMappingURL=Level.mjs.map