molindo-node-logger
Advanced tools
Comparing version 1.2.0 to 2.0.0
# Changelog | ||
## 2.0.0 | ||
Update devDependencies and dependencies. Update to newest `winston` and | ||
`express-winston`. Adapt to breaking changes. ([#20](https://github.com/molindo/molindo-node-logger/pull/20)) | ||
### Breaking Changes | ||
- Supported Node.js version changed to >= 20. | ||
- Removed `destroy()` from `Logger` class. | ||
## 1.2.0 | ||
@@ -9,2 +19,4 @@ | ||
Fix logging of GraphQL response in case of errors ([@symn](https://github.com/symn) in [#3](https://github.com/molindo/molindo-node-logger/pull/3)). | ||
Fix logging of GraphQL response in case of errors | ||
([@symn](https://github.com/symn) in | ||
[#3](https://github.com/molindo/molindo-node-logger/pull/3)). |
{ | ||
"name": "molindo-node-logger", | ||
"version": "1.2.0", | ||
"version": "2.0.0", | ||
"description": "A node.js logger that integrates well with the Molindo infrastructure.", | ||
"main": "lib/index.js", | ||
"main": "dist/index.js", | ||
"repository": "https://github.com/molindo/molindo-node-logger.git", | ||
@@ -15,40 +15,36 @@ "author": "Jan Amann <jam@molindo.at>", | ||
], | ||
"exports": { | ||
".": { | ||
"import": "./dist/index.mjs", | ||
"default": "./dist/index.js" | ||
} | ||
}, | ||
"scripts": { | ||
"build": "bunchee", | ||
"lint": "eslint src", | ||
"test": "jest", | ||
"test:watch": "npm run test -- --watch --onlyChanged", | ||
"build": "babel src -d lib --ignore __tests__", | ||
"prepublish": "npm run lint && npm run test && rimraf ./lib && npm run build" | ||
"test": "vitest", | ||
"prepublish": "yarn run lint && yarn run test -- --run && rimraf ./dist && npm run build" | ||
}, | ||
"files": [ | ||
"lib" | ||
"dist" | ||
], | ||
"devDependencies": { | ||
"babel-cli": "6.26.0", | ||
"babel-eslint": "7.2.3", | ||
"babel-jest": "21.2.0", | ||
"babel-plugin-transform-class-properties": "6.24.1", | ||
"babel-plugin-transform-object-rest-spread": "6.26.0", | ||
"babel-preset-env": "1.6.1", | ||
"eslint": "4.6.1", | ||
"eslint-config-molindo": "1.0.0", | ||
"eslint-plugin-css-modules": "2.7.5", | ||
"eslint-plugin-import": "2.7.0", | ||
"eslint-plugin-import-order-autofix": "0.8.3", | ||
"eslint-plugin-jsx-a11y": "6.0.2", | ||
"eslint-plugin-prettier": "2.2.0", | ||
"eslint-plugin-react": "7.3.0", | ||
"jest": "21.2.1", | ||
"prettier": "1.7.0", | ||
"supertest": "3.0.0" | ||
"bunchee": "^5.1.2", | ||
"eslint": "8.56.0", | ||
"eslint-config-molindo": "7.0.0", | ||
"prettier": "3.2.5", | ||
"supertest": "6.3.4", | ||
"vitest": "^1.3.1" | ||
}, | ||
"dependencies": { | ||
"body-parser": "^1.18.2", | ||
"express": "^4.16.2", | ||
"express-winston": "^2.4.0", | ||
"winston": "^2.4.0" | ||
"body-parser": "^1.20.2", | ||
"express": "^4.19.2", | ||
"express-winston": "^4.2.0", | ||
"winston": "^3.13.0", | ||
"winston-transport": "^4.7.0" | ||
}, | ||
"engines": { | ||
"node": ">= 8.10.0" | ||
"node": ">= 20" | ||
} | ||
} |
@@ -7,9 +7,9 @@ # molindo-node-logger | ||
- Pretty prints messages in development mode. | ||
- Prints JSON messages in production mode. | ||
- Errors are printed to `stderr`, while all other levels are printed to `stdout`. | ||
- In development only infos, warnings and errors are printed, while in production all levels are printed. | ||
- If the process encounters an error, it will log it to the console before shutting down. `unhandledRejection` errors thrown from promises are logged as well. | ||
- Offers an express integration that logs HTTP requests, including the `operationName` in the case of GraphQL requests. Confidential headers like `cookie` or `authorization` are masked. | ||
- Uses the levels and level values from [logback](https://logback.qos.ch/): `ERROR` (40000), `WARN` (30000), `INFO` (20000), `DEBUG` (10000), `TRACE` (5000). | ||
- Pretty prints messages in development mode. | ||
- Prints JSON messages in production mode. | ||
- Errors are printed to `stderr`, while all other levels are printed to `stdout`. | ||
- In development only infos, warnings and errors are printed, while in production all levels are printed. | ||
- If the process encounters an error, it will log it to the console before shutting down. `unhandledRejection` errors thrown from promises are logged as well. | ||
- Offers an express integration that logs HTTP requests, including the `operationName` in the case of GraphQL requests. Confidential headers like `cookie` or `authorization` are masked. | ||
- Uses the levels and level values from [logback](https://logback.qos.ch/): `ERROR` (40000), `WARN` (30000), `INFO` (20000), `DEBUG` (10000), `TRACE` (5000). | ||
@@ -21,7 +21,7 @@ ## Usage | ||
const logger = new Logger({service: 'pizza-shop'}); | ||
const logger = new Logger({ service: 'pizza-shop' }); | ||
logger.trace('Making a salami pizza …'); | ||
logger.debug('Adding salami …'); | ||
logger.info('Putting it in the oven …'); | ||
logger.warn('Don\'t forget to get it out in time …'); | ||
logger.warn("Don't forget to get it out in time …"); | ||
logger.error('Oh no, the pizza is burned!'); | ||
@@ -48,8 +48,8 @@ ``` | ||
import express from 'express'; | ||
import Logger, {createLoggerMiddleware} from 'molindo-node-logger'; | ||
import Logger, { createLoggerMiddleware } from 'molindo-node-logger'; | ||
const server = express(); | ||
const logger = new Logger({service: 'pizza-shop'}); | ||
server.use(createLoggerMiddleware({logger})); | ||
const logger = new Logger({ service: 'pizza-shop' }); | ||
server.use(createLoggerMiddleware({ logger })); | ||
``` |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
21823
7
538
5
5
5
2
+ Addedwinston-transport@^4.7.0
+ Added@colors/colors@1.6.0(transitive)
+ Added@dabh/diagnostics@2.0.3(transitive)
+ Added@types/triple-beam@1.3.5(transitive)
+ Addedansi-styles@3.2.1(transitive)
+ Addedasync@3.2.6(transitive)
+ Addedchalk@2.4.2(transitive)
+ Addedcolor@3.2.1(transitive)
+ Addedcolor-convert@1.9.3(transitive)
+ Addedcolor-name@1.1.3(transitive)
+ Addedcolor-string@1.9.1(transitive)
+ Addedcolorspace@1.1.4(transitive)
+ Addedenabled@2.0.0(transitive)
+ Addedescape-string-regexp@1.0.5(transitive)
+ Addedexpress-winston@4.2.0(transitive)
+ Addedfecha@4.2.3(transitive)
+ Addedfn.name@1.1.0(transitive)
+ Addedhas-flag@3.0.0(transitive)
+ Addedis-arrayish@0.3.2(transitive)
+ Addedis-stream@2.0.1(transitive)
+ Addedkuler@2.0.0(transitive)
+ Addedlogform@2.7.0(transitive)
+ Addedone-time@1.0.0(transitive)
+ Addedreadable-stream@3.6.2(transitive)
+ Addedsafe-stable-stringify@2.5.0(transitive)
+ Addedsimple-swizzle@0.2.2(transitive)
+ Addedstring_decoder@1.3.0(transitive)
+ Addedsupports-color@5.5.0(transitive)
+ Addedtext-hex@1.0.0(transitive)
+ Addedtriple-beam@1.4.1(transitive)
+ Addedutil-deprecate@1.0.2(transitive)
+ Addedwinston@3.17.0(transitive)
+ Addedwinston-transport@4.9.0(transitive)
- Removedansi-styles@1.0.0(transitive)
- Removedasync@2.6.4(transitive)
- Removedchalk@0.4.0(transitive)
- Removedcolors@1.0.3(transitive)
- Removedcycle@1.0.3(transitive)
- Removedexpress-winston@2.6.0(transitive)
- Removedeyes@0.1.8(transitive)
- Removedhas-color@0.1.7(transitive)
- Removedisstream@0.1.2(transitive)
- Removedstrip-ansi@0.1.1(transitive)
- Removedwinston@2.4.7(transitive)
Updatedbody-parser@^1.20.2
Updatedexpress@^4.19.2
Updatedexpress-winston@^4.2.0
Updatedwinston@^3.13.0