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

@cliengo/logger

Package Overview
Dependencies
Maintainers
7
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cliengo/logger - npm Package Compare versions

Comparing version 1.0.1 to 1.1.0

18

lib/cjs/LogService.js

@@ -98,2 +98,20 @@ "use strict";

}
/** logs a handled client error
* @param {string} [entry.context] name of class+method or function where the log is called (optional)
* @param {string} [entry.message] string description of the logged action (optional)
* @param {unknown} [entry.metadata] object for giving further information (optional)
* @param {ErrorCode} entry.errorCode standard code of the error
*/
clientError(entry) {
const { context, message, metadata, errorCode } = entry;
this.logger.log({
level: enum_1.Level.warn,
message: message || ErrorCodeDefaultDesciption[errorCode],
category: enum_1.Category.EXCEPTION,
context,
correlationId: express_correlation_id_1.default.getId(),
errorCode,
metadata,
});
}
/** logs an operation, like database access

@@ -100,0 +118,0 @@ * @param {string} [entry.context] name of class+method or function where the log is called (optional)

@@ -31,2 +31,9 @@ import correlator from "express-correlation-id";

exception(entry: ILogErrorEntry): void;
/** logs a handled client error
* @param {string} [entry.context] name of class+method or function where the log is called (optional)
* @param {string} [entry.message] string description of the logged action (optional)
* @param {unknown} [entry.metadata] object for giving further information (optional)
* @param {ErrorCode} entry.errorCode standard code of the error
*/
clientError(entry: ILogErrorEntry): void;
/** logs an operation, like database access

@@ -33,0 +40,0 @@ * @param {string} [entry.context] name of class+method or function where the log is called (optional)

@@ -92,2 +92,20 @@ import correlator from "express-correlation-id";

}
/** logs a handled client error
* @param {string} [entry.context] name of class+method or function where the log is called (optional)
* @param {string} [entry.message] string description of the logged action (optional)
* @param {unknown} [entry.metadata] object for giving further information (optional)
* @param {ErrorCode} entry.errorCode standard code of the error
*/
clientError(entry) {
const { context, message, metadata, errorCode } = entry;
this.logger.log({
level: Level.warn,
message: message || ErrorCodeDefaultDesciption[errorCode],
category: Category.EXCEPTION,
context,
correlationId: correlator.getId(),
errorCode,
metadata,
});
}
/** logs an operation, like database access

@@ -94,0 +112,0 @@ * @param {string} [entry.context] name of class+method or function where the log is called (optional)

@@ -31,2 +31,9 @@ import correlator from "express-correlation-id";

exception(entry: ILogErrorEntry): void;
/** logs a handled client error
* @param {string} [entry.context] name of class+method or function where the log is called (optional)
* @param {string} [entry.message] string description of the logged action (optional)
* @param {unknown} [entry.metadata] object for giving further information (optional)
* @param {ErrorCode} entry.errorCode standard code of the error
*/
clientError(entry: ILogErrorEntry): void;
/** logs an operation, like database access

@@ -33,0 +40,0 @@ * @param {string} [entry.context] name of class+method or function where the log is called (optional)

2

package.json
{
"name": "@cliengo/logger",
"version": "1.0.1",
"version": "1.1.0",
"description": "...",

@@ -5,0 +5,0 @@ "exports": {

Sorry, the diff of this file is not supported yet

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