codemeasandwich / scribbles

scribbles is a log and tracing lib for Node
MIT License
10 stars 0 forks source link

Add full stack-trace to dataOut #30

Open codemeasandwich opened 1 year ago

codemeasandwich commented 1 year ago

Could a new property (i.e. "from") be added to the dataOut object representation that would have the full stack Trace?

{
   v:"1.2.3",

  from: [ "at main (c:\Users\Me\Documents\MyApp\app.js:9:15)",
    "at Object (c:\Users\Me\Documents\MyApp\app.js:17:1)",
    "at Module._compile (module.js:460:26)",
    "at Object.Module._extensions..js (module.js:478:10)" ],

   git:{
      repo:"myRepo",
      branch:"master",
      hash:"3d608bf"
   },
   trace:{
      ...
   }
   info:{
      time:2022-06-27T16:24:06.473Z,
      mode:"local",
      hostname:"box",
      logLevel:"log",
      instance:"bfc977a"
   },
   context:{
      fileName:"index.js",
      lineNumber:174
   },
   input:{
    message: "hello world"
   },
}