@takeshape/logger
Advanced tools
Comparing version 7.134.4 to 7.194.0
@@ -1,1 +0,1 @@ | ||
export { default, loggerWithContext, Logger, TimberMetadata } from './logger'; | ||
export { default, loggerWithContext } from './logger'; |
@@ -17,5 +17,7 @@ import merge from 'lodash/merge'; | ||
return (message, metadata) => { | ||
// eslint-disable-next-line no-console | ||
console[level](message); | ||
if (metadata) { | ||
// eslint-disable-next-line no-console | ||
console[level](prettyjson.render(metadata), '\n'); | ||
@@ -43,4 +45,5 @@ } | ||
} | ||
} | ||
} // eslint-disable-next-line no-console | ||
console[level].apply(null, args); | ||
@@ -47,0 +50,0 @@ }; |
@@ -1,2 +0,3 @@ | ||
export { default, loggerWithContext, Logger, TimberMetadata } from './logger'; | ||
export type { Logger, TimberMetadata } from './logger'; | ||
export { default, loggerWithContext } from './logger'; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -18,14 +18,2 @@ "use strict"; | ||
}); | ||
Object.defineProperty(exports, "Logger", { | ||
enumerable: true, | ||
get: function () { | ||
return _logger.Logger; | ||
} | ||
}); | ||
Object.defineProperty(exports, "TimberMetadata", { | ||
enumerable: true, | ||
get: function () { | ||
return _logger.TimberMetadata; | ||
} | ||
}); | ||
@@ -32,0 +20,0 @@ var _logger = _interopRequireWildcard(require("./logger")); |
@@ -1,2 +0,2 @@ | ||
import { TimberContext, TimberLogEntry } from './types'; | ||
import type { TimberContext, TimberLogEntry } from './types'; | ||
export interface TimberMetadata extends Partial<TimberLogEntry> { | ||
@@ -3,0 +3,0 @@ error?: Error; |
@@ -29,5 +29,7 @@ "use strict"; | ||
return (message, metadata) => { | ||
// eslint-disable-next-line no-console | ||
console[level](message); | ||
if (metadata) { | ||
// eslint-disable-next-line no-console | ||
console[level](prettyjson.render(metadata), '\n'); | ||
@@ -55,4 +57,5 @@ } | ||
} | ||
} | ||
} // eslint-disable-next-line no-console | ||
console[level].apply(null, args); | ||
@@ -59,0 +62,0 @@ }; |
{ | ||
"name": "@takeshape/logger", | ||
"version": "7.134.4", | ||
"version": "7.194.0", | ||
"description": "Logging utility.", | ||
@@ -22,2 +22,7 @@ "homepage": "https://www.takeshape.io", | ||
], | ||
"dependencies": { | ||
"@sentry/node": "^5.27.2", | ||
"lodash": "^4.17.20", | ||
"prettyjson": "^1.2.1" | ||
}, | ||
"scripts": { | ||
@@ -31,3 +36,2 @@ "lint": "eslint . --ext .js,.ts", | ||
"clean": "rimraf lib es build *.tsbuildinfo", | ||
"prepublishOnly": "pnpm lint && pnpm test && pnpm clean && pnpm build", | ||
"build": "pnpm clean && pnpm build:types && pnpm build:js && pnpm build:es && pnpm build:copy", | ||
@@ -39,8 +43,3 @@ "build:types": "tsc --emitDeclarationOnly --project tsconfig.build.json", | ||
"will-it-blend": "pnpm typecheck && pnpm lint -- --quiet && pnpm test -- --silent --coverage false" | ||
}, | ||
"dependencies": { | ||
"@sentry/node": "^5.27.2", | ||
"lodash": "^4.17.20", | ||
"prettyjson": "^1.2.1" | ||
} | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
37791
820