DefinitelyTyped/types/bristol/bristol-tests.ts
Elliott Campbell a1b4916891 Add type declarations for [bristol] logger (#38042)
* [bristol] Added types for bristol logger

* [bristol] made recommended changes for most common use cases
2019-09-09 10:46:25 -07:00

18 lines
364 B
TypeScript

import bristol = require('bristol');
bristol.addTarget('console');
bristol.info('Things be working.', {});
bristol.addTarget('console').withFormatter('human');
bristol.debug('Hello, world', { code: 404 });
const uhoh = {
code: 500,
error: {
message: 'Something broke',
reason: 'idk why though',
},
};
bristol.error('Something went wrong', uhoh);