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

json-logger-service

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

json-logger-service - npm Package Compare versions

Comparing version 1.0.7 to 1.0.8

4

dist/spec/index.spec.js

@@ -47,6 +47,6 @@ "use strict";

it('Should log debug', () => {
jsonLoggerService.debug({ a: 'CONTEXT' }, 'It works!');
jsonLoggerService.debug('It works!', 'CONTEXT');
});
it('Should log warn', () => {
jsonLoggerService.warn({ a: 'CONTEXT' }, 'It works!');
jsonLoggerService.warn('It works!', 'CONTEXT');
});

@@ -53,0 +53,0 @@ it('Should log verbose', () => {

@@ -33,5 +33,7 @@ "use strict";

getBunyanParams(message, context) {
const contextObj = (typeof context) === 'object' ? context : { context };
return {
context: message === undefined ?
this.getDefaultContextObject() : Object.assign(this.getDefaultContextObject(), context),
this.getDefaultContextObject()
: Object.assign(this.getDefaultContextObject(), contextObj),
message: message === undefined ? context : message,

@@ -38,0 +40,0 @@ };

@@ -6,7 +6,7 @@ import { LoggerService } from '@nestjs/common';

constructor(name: string, customContextBuilder?: CustomContextBuilderInterface);
log(context: any, message?: string): any;
error(context: any, trace?: string, message?: string): any;
warn(context: any, message?: string): any;
debug?(context: any, message?: string): any;
verbose?(context: any, message?: string): any;
log(message: any, context?: string): any;
error(message: any, trace?: string, context?: string): any;
warn(message: any, context?: string): any;
debug?(message: any, context?: string): any;
verbose?(message: any, context?: string): any;
}

@@ -8,15 +8,15 @@ "use strict";

}
log(context, message) {
log(message, context) {
return this.logger.info(context, message);
}
error(context, trace, message) {
error(message, trace, context) {
return this.logger.error(context, trace, message);
}
warn(context, message) {
warn(message, context) {
return this.logger.warn(context, message);
}
debug(context, message) {
debug(message, context) {
return this.logger.debug(context, message);
}
verbose(context, message) {
verbose(message, context) {
return this.logger.trace(context, message);

@@ -23,0 +23,0 @@ }

{
"name": "json-logger-service",
"version": "1.0.7",
"version": "1.0.8",
"description": "Nest Json LoggerService implementation.",

@@ -5,0 +5,0 @@ "main": "dist/index",

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