import { initLogger } from '@storyous/logger';
const config = {
env: process.env.NODE_ENV,
logging: {
console: {
colorize: true,
// Use for localhost development only, it will output nicely readable logs
// and if error appears the stack will be clickable in webstorm
prettyOutput: true,
},
loggly: {
silent: true,
token: process.env.LOGGLY_TOKEN || '',
subdomain: 'storyous',
tags: ['serviceName', process.env.NODE_ENV],
json: true
},
sentry: {
dsn: process.env.SENTRY_DSN || '',
level: 'error',
silent: true
}
}
}
const logger = initLogger(config.env, config.logging);
// define new logger for specific module
const logModule = logger.module('extraLogger');
export default logger;
@storyous/logger
1.0.9 • Public • PublishedReadme
Keywords
nonePackage Sidebar
Install
npm i @storyous/logger
Repository
Weekly Downloads
28
Version
1.0.9
License
ISC
Unpacked Size
50.8 kB
Total Files
5