UNPKG

diary

Version:

Fast effective logging library for both Node, the Browser, and Workers!

1 lines 288 B
import{sprintf as e}from"diary/utils";var o=({name:o,level:s,messages:l,...r})=>{if("object"==typeof l[0])return console.log(JSON.stringify({name:o,level:s,...l,...r}));{const t=l.shift();return console.log(JSON.stringify({name:o,level:s,message:e(t,...l),...r}))}};export{o as reporter};