mirror of
https://github.com/wassname/talk.git
synced 2026-08-11 11:27:10 +08:00
fix for logger
This commit is contained in:
+1
-1
@@ -79,6 +79,7 @@
|
||||
"babel-polyfill": "^6.26.0",
|
||||
"babel-preset-es2015": "6.24.1",
|
||||
"babel-preset-react": "^6.23.0",
|
||||
"bunyan-debug-stream": "^1.0.8",
|
||||
"bcryptjs": "^2.4.3",
|
||||
"bowser": "^1.7.2",
|
||||
"brotli-webpack-plugin": "^0.5.0",
|
||||
@@ -218,7 +219,6 @@
|
||||
"babel-plugin-dynamic-import-node": "^1.1.0",
|
||||
"babel-plugin-transform-es2015-modules-commonjs": "^6.26.0",
|
||||
"browserstack-local": "^1.3.0",
|
||||
"bunyan-debug-stream": "^1.0.8",
|
||||
"chai": "^3.5.0",
|
||||
"chai-as-promised": "^6.0.0",
|
||||
"chai-datetime": "^1.5.0",
|
||||
|
||||
+1
-1
@@ -2,13 +2,13 @@ const { version } = require('../package.json');
|
||||
const path = require('path');
|
||||
const { createLogger: createBunyanLogger, stdSerializers } = require('bunyan');
|
||||
const { LOGGING_LEVEL, REVISION_HASH } = require('../config');
|
||||
const debug = require('bunyan-debug-stream');
|
||||
|
||||
// Streams enables the ability for development logs to be readable to a human,
|
||||
// but will send JSON logs in production that's parsable by a system like ELK.
|
||||
const streams = (() => {
|
||||
// In development, use the debug stream printer.
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
const debug = require('bunyan-debug-stream');
|
||||
return [
|
||||
{
|
||||
level: LOGGING_LEVEL,
|
||||
|
||||
Reference in New Issue
Block a user