nestjs-logitron
Version:
Powerful logger module for Nodejs/ Nestjs, seamlessly integrating Pino and Winston for flexible logging with easy configuration.
2 lines (1 loc) • 399 B
JavaScript
import{AsyncLocalStorage as f}from"async_hooks";var n=new f;function l(r,a,i,t,...s){let c=new Date().toISOString(),m=n.getStore()?.traceId??"N/A",e=s.find(o=>o&&typeof o=="object")??null,g=t?.name??"N/A",p=typeof t?.time=="number"?`${t.time} ms`:"N/A";return`[${c}] [${r.toUpperCase()}] [${a.toUpperCase()}] [${m}] [${i}] [${e?JSON.stringify(e):"N/A"}] [${g}] [${p}]`}var y=l;export{y as default};