codemeasandwich / scribbles

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

under 'context' add 'method' #26

Open codemeasandwich opened 1 year ago

codemeasandwich commented 1 year ago

From a trace 'api' would be the method

Error
    at api (/lib/index.js:174:15)
    at /node_modules/express-ws/lib/wrap-middleware.js:13:9
    at Layer.handle [as handle_request] (/node_modules/bar/lib/router/layer.js:95:5)
    at next (/node_modules/bar/lib/router/route.js:137:13)
    at Route.dispatch (/node_modules/bar/lib/router/route.js:112:3)

a print could be

// myRepo:local:master [ ] 2022-06-27T16:24:06.473 #3d608bf <log> index.js:174 (api) hello world

{repo}:{mode}:{branch} [{spanLabel} {spanId}] {time} #{hash} <{logLevel}> {fileName}:{lineNumber} (method) {message} {value} {stackTrace}