Conversation
package.json
Outdated
There was a problem hiding this comment.
We need the same prepublish in tchannel :)
Which means tchannel is coupled to larch... which means... let's just figure it out.
|
This seems reasonable. I want to try running it and looking at a diff of the pre-process vs post-process. Also we need to figure out what to do in terms of workflow, prepublish might have to copy into a "build/*" folder and we should change the package.json to import from there. Then we can .gitignore build/* |
|
tests fail lal. |
|
Changed this to use publish.sh. It's real ugly but it runs the replacer, makes a temp commit, creates the package, then resets git. |
There was a problem hiding this comment.
it'll fail bc DebugLotron everywhere (including in TChannel's test cluster or whatever) which doesn't have the right interface
|
we need to fix debug logtron. |
| return msgMatches[1]; | ||
| } | ||
|
|
||
| // Inserts an if (logger.willSample('level')) before a logsite for a particular |
There was a problem hiding this comment.
update comment: willSample('level', 'msg')
This requires an updated larch so it isn't ready to land yet, but it works.
Wrote a simple script to insert
willSamplechecks before log lines. I messed around with using some macro systems (sweet.js and the C preprocessor) but found that neither would work. The replacer script is an inelegant solution but it's short and it works.r: @Raynos @jcorbin