New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@dotcom-reliability-kit/middleware-log-errors

Package Overview
Dependencies
Maintainers
4
Versions
62
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dotcom-reliability-kit/middleware-log-errors - npm Package Compare versions

Comparing version 1.3.0 to 1.4.0

3

lib/index.d.ts

@@ -8,2 +8,5 @@ export = createErrorLoggingMiddleware;

includeHeaders?: string[] | undefined;
logger?: (import("@dotcom-reliability-kit/log-error").Logger & {
[x: string]: any;
}) | undefined;
};

@@ -10,0 +13,0 @@ declare namespace exports {

@@ -7,2 +7,4 @@ const { logHandledError } = require('@dotcom-reliability-kit/log-error');

* An array of request headers to include in the log.
* @property {import('@dotcom-reliability-kit/log-error').Logger & Object<string, any>} [logger]
* The logger to use to output errors. Defaults to n-logger.
*/

@@ -41,2 +43,3 @@

includeHeaders,
logger: options.logger,
request

@@ -43,0 +46,0 @@ });

6

package.json
{
"name": "@dotcom-reliability-kit/middleware-log-errors",
"version": "1.3.0",
"version": "1.4.0",
"description": "Express middleware to consistently log errors",

@@ -19,6 +19,6 @@ "repository": {

"dependencies": {
"@dotcom-reliability-kit/log-error": "^1.4.0"
"@dotcom-reliability-kit/log-error": "^1.5.0"
},
"devDependencies": {
"@financial-times/n-express": "^26.3.3",
"@financial-times/n-express": "^26.3.5",
"@types/express": "^4.17.14",

@@ -25,0 +25,0 @@ "node-fetch": "^2.6.7"

## @dotcom-reliability-kit/middleware-log-errors
# @dotcom-reliability-kit/middleware-log-errors
Express middleware to consistently log errors. This module is part of [FT.com Reliability Kit](https://github.com/Financial-Times/dotcom-reliability-kit#readme).
* [Usage](#usage)
* [`createErrorLogger`](#createerrorlogger)
* [configuration options](#configuration-options)
* [`includeHeaders`](#optionsincludeheaders)
* [Contributing](#contributing)
* [License](#license)
* [Usage](#usage)
* [`createErrorLogger`](#createerrorlogger)
* [Configuration options](#configuration-options)
* [`options.includeHeaders`](#optionsincludeheaders)
* [`options.logger`](#optionslogger)
* [Contributing](#contributing)
* [License](#license)

@@ -132,3 +133,13 @@

#### `options.logger`
A logger object which implements two methods, `error` and `warn`, which have the following permissive signature:
```ts
type LogMethod = (...logData: any) => any;
```
This is passed directly onto the relevant log-error method, [see the documentation for that package for more details](../log-error/README.md#optionslogger).
## Contributing

@@ -135,0 +146,0 @@

Sorry, the diff of this file is not supported yet

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