Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Quick and easy
- // add correlation id to app logs
- // set correlation id in test steps (but ignore user-specified correlation id in production)
- log.anonymised({some:"log"});
- log.sensitive(() => {some:"log"});
- log.sensitive({some:"log"});
- // Maybe inconvenient, and maybe we don't need it
- // Stateful thread locals would be better, but hey ho
- const block = log.block("some block")
- const subblock = block.block("some sub-block")
- {
- rootId: 1, // in Log, from request scope
- parentId: 1, // created by block()
- id: 1, // automatic
- }
- {
- rootId: 1, // in Log, from request scope
- parentId: 1, // created by block()
- id: 2, // automatic
- type: "block",
- message: "some title"
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement