mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
* [bristol] Added types for bristol logger * [bristol] made recommended changes for most common use cases
18 lines
364 B
TypeScript
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);
|