mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-21 09:03:02 +00:00
fix: removing transformations in production
This commit is contained in:
@@ -106,9 +106,7 @@ export class Logger {
|
||||
}
|
||||
|
||||
let transformedOutput = output;
|
||||
for (const transformation of Logger.transformations.filter(transform =>
|
||||
!isProductiveEnvironment() ? true : transform.useInProduction === isProductiveEnvironment(),
|
||||
)) {
|
||||
for (const transformation of Logger.transformations) {
|
||||
transformedOutput = transformation.transform(logLevel, transformedOutput);
|
||||
}
|
||||
|
||||
@@ -292,7 +290,10 @@ export class Logger {
|
||||
* @param transformations List of transformations
|
||||
*/
|
||||
public static setTransformations(transformations: Transformation[]) {
|
||||
Logger.transformations = transformations;
|
||||
const transforms = transformations.filter(transform =>
|
||||
isProductiveEnvironment() ? transform.useInProduction === true : true,
|
||||
);
|
||||
Logger.transformations = transforms;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user