mirror of
https://github.com/wassname/talk.git
synced 2026-06-28 13:55:22 +08:00
86c36f7d39
- filtering for confirmed emails - fixes to logger to expose logger controls - refactored graphql calls in other notification plugins
19 lines
466 B
JavaScript
19 lines
466 B
JavaScript
const { version } = require('../package.json');
|
|
const Logger = require('bunyan');
|
|
const uuid = require('uuid/v1');
|
|
const { LOGGING_LEVEL } = require('../config');
|
|
|
|
// Create the logging instance that all logger's are branched from.
|
|
function createLogger(name, id = uuid()) {
|
|
return new Logger({
|
|
src: true,
|
|
name,
|
|
id,
|
|
version,
|
|
level: LOGGING_LEVEL,
|
|
serializers: { req: Logger.stdSerializers.req },
|
|
});
|
|
}
|
|
|
|
module.exports = { createLogger };
|