xcally-nest-library 0.0.16 → 0.0.17

Sign up to get free protection for your applications and to get access to all the features.
@@ -23,6 +23,7 @@ let LoggerModule = LoggerModule_1 = class LoggerModule {
23
23
  imports: [config_1.ConfigModule],
24
24
  inject: [config_1.ConfigService],
25
25
  useFactory: async (config) => {
26
+ const projectName = process.env.npm_package_name || 'default_project';
26
27
  return {
27
28
  pinoHttp: {
28
29
  level: config.get('LOG_LEVEL') || 'info',
@@ -42,7 +43,7 @@ let LoggerModule = LoggerModule_1 = class LoggerModule {
42
43
  level: 'info',
43
44
  target: 'pino/file',
44
45
  options: {
45
- destination: './logs/info.log',
46
+ destination: `./logs/${projectName}-info.log`,
46
47
  mkdir: true,
47
48
  append: process.env.NODE_ENV !== 'production' ? false : true,
48
49
  },
@@ -1 +1 @@
1
- {"version":3,"file":"logger.module.js","sourceRoot":"","sources":["../../../../../src/modules/logger/pino/logger.module.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,2CAA+D;AAC/D,2CAA6D;AAC7D,6CAA+D;AAC/D,qDAAiD;AAI1C,IAAM,YAAY,oBAAlB,MAAM,YAAY;IACvB,MAAM,CAAC,OAAO;QACZ,OAAO;YACL,MAAM,EAAE,cAAY;YACpB,SAAS,EAAE,CAAC,8BAAa,CAAC;YAC1B,OAAO,EAAE,CAAC,8BAAa,CAAC;YACxB,OAAO,EAAE;gBACP,0BAAgB,CAAC,YAAY,CAAC;oBAC5B,OAAO,EAAE,CAAC,qBAAY,CAAC;oBACvB,MAAM,EAAE,CAAC,sBAAa,CAAC;oBACvB,UAAU,EAAE,KAAK,EAAE,MAAqB,EAAE,EAAE;wBAC1C,OAAO;4BACL,QAAQ,EAAE;gCACR,KAAK,EAAE,MAAM,CAAC,GAAG,CAAC,WAAW,CAAC,IAAI,MAAM;gCAWxC,MAAM,EAAE;oCACN,KAAK,EAAE,CAAC,oBAAoB,EAAE,2BAA2B,CAAC;iCAC3D;gCACD,SAAS,EAAE;oCACT,OAAO,EAAE;wCACP;4CACE,KAAK,EAAE,OAAO;4CACd,MAAM,EAAE,aAAa;4CACrB,OAAO,EAAE;gDACP,QAAQ,EAAE,IAAI;6CACf;yCACF;wCAQD;4CACE,KAAK,EAAE,MAAM;4CACb,MAAM,EAAE,WAAW;4CACnB,OAAO,EAAE;gDACP,WAAW,EAAE,iBAAiB;gDAC9B,KAAK,EAAE,IAAI;gDACX,MAAM,EAAE,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,YAAY,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI;6CAC7D;yCACF;qCACF;iCACF;6BAKF;yBACF,CAAC;oBACJ,CAAC;iBACF,CAAC;aACH;SACF,CAAC;IACJ,CAAC;CACF,CAAA;AAjEY,oCAAY;uBAAZ,YAAY;IAFxB,IAAA,eAAM,GAAE;IACR,IAAA,eAAM,EAAC,EAAE,CAAC;GACE,YAAY,CAiExB"}
1
+ {"version":3,"file":"logger.module.js","sourceRoot":"","sources":["../../../../../src/modules/logger/pino/logger.module.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,2CAA+D;AAC/D,2CAA6D;AAC7D,6CAA+D;AAC/D,qDAAiD;AAI1C,IAAM,YAAY,oBAAlB,MAAM,YAAY;IACvB,MAAM,CAAC,OAAO;QACZ,OAAO;YACL,MAAM,EAAE,cAAY;YACpB,SAAS,EAAE,CAAC,8BAAa,CAAC;YAC1B,OAAO,EAAE,CAAC,8BAAa,CAAC;YACxB,OAAO,EAAE;gBACP,0BAAgB,CAAC,YAAY,CAAC;oBAC5B,OAAO,EAAE,CAAC,qBAAY,CAAC;oBACvB,MAAM,EAAE,CAAC,sBAAa,CAAC;oBACvB,UAAU,EAAE,KAAK,EAAE,MAAqB,EAAE,EAAE;wBAC1C,MAAM,WAAW,GAAG,OAAO,CAAC,GAAG,CAAC,gBAAgB,IAAI,iBAAiB,CAAC;wBACtE,OAAO;4BACL,QAAQ,EAAE;gCACR,KAAK,EAAE,MAAM,CAAC,GAAG,CAAC,WAAW,CAAC,IAAI,MA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