@autofleet/logger 2.0.0-beta-1 → 2.0.0-beta-2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +5 -6
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -69,11 +69,7 @@ const enumerateErrorFormat = winston.format((info) => {
69
69
 
70
70
  const getFormat = () => {
71
71
  if (isProd) {
72
- return winston.format.combine(
73
- new winston.transports.Console(),
74
- // Add Stackdriver Logging
75
- loggingWinston,
76
- );
72
+ return undefined;
77
73
  }
78
74
 
79
75
  return winston.format.combine(
@@ -88,7 +84,10 @@ const createLoggerInstance = (level, exceptionHandlers) => {
88
84
  const logger = createLogger({
89
85
  level,
90
86
  format: getFormat(),
91
- transports: [
87
+ transports: isProd ? [
88
+ new winston.transports.Console(),
89
+ loggingWinston,
90
+ ] : [
92
91
  new winston.transports.Console(),
93
92
  ],
94
93
  exceptionHandlers,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@autofleet/logger",
3
- "version": "2.0.0-beta-1",
3
+ "version": "2.0.0-beta-2",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "coverage": "jest --coverage --forceExit --runInBand",