Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

molindo-node-logger

Package Overview
Dependencies
Maintainers
2
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

molindo-node-logger - npm Package Compare versions

Comparing version 1.2.0 to 2.0.0

dist/index.js

14

CHANGELOG.md
# 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)).

52

package.json
{
"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 }));
```
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc