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

cf-nodejs-logging-support

Package Overview
Dependencies
Maintainers
6
Versions
100
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cf-nodejs-logging-support - npm Package Compare versions

Comparing version 7.3.0-beta.2 to 7.3.0

1

build/main/index.d.ts

@@ -6,1 +6,2 @@ import RootLogger from "./lib/logger/rootLogger";

export * from "./lib/logger/level";
export * from "./lib/logger/logger";

@@ -27,2 +27,3 @@ "use strict";

__exportStar(require("./lib/logger/level"), exports);
__exportStar(require("./lib/logger/logger"), exports);
//# sourceMappingURL=index.js.map

2

build/main/lib/logger/logger.d.ts
import { Level } from './level';
import Context from './context';
export default class Logger {
export declare class Logger {
private parent?;

@@ -5,0 +5,0 @@ private context?;

@@ -6,2 +6,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.Logger = void 0;
const levelUtils_1 = __importDefault(require("../helper/levelUtils"));

@@ -165,3 +166,3 @@ const utils_1 = require("../middleware/utils");

}
exports.default = Logger;
exports.Logger = Logger;
//# sourceMappingURL=logger.js.map

@@ -5,3 +5,3 @@ /// <reference types="node" />

import { ConfigObject, CustomFieldsFormat, Framework } from '../config/interfaces';
import Logger from './logger';
import { Logger } from './logger';
export default class RootLogger extends Logger {

@@ -8,0 +8,0 @@ private static instance;

@@ -14,5 +14,5 @@ "use strict";

const level_1 = require("./level");
const logger_1 = __importDefault(require("./logger"));
const logger_1 = require("./logger");
const recordWriter_1 = __importDefault(require("./recordWriter"));
class RootLogger extends logger_1.default {
class RootLogger extends logger_1.Logger {
constructor() {

@@ -19,0 +19,0 @@ super();

import { FrameworkService } from "../interfaces";
export default class ConnectService implements FrameworkService {
getReqHeaderField(req: any, fieldName: string): string;
getReqHeaderField(req: any, fieldName: string): string | undefined;
getReqField(req: any, fieldName: string): any;
getResHeaderField(res: any, fieldName: string): string;
getResHeaderField(res: any, fieldName: string): string | undefined;
getResField(res: any, fieldName: string): any;
onResFinish(res: any, handler: () => void): undefined;
onResFinish(res: any, handler: () => void): void;
}

@@ -32,3 +32,3 @@ "use strict";

getResHeaderField(res, fieldName) {
return res.getHeader ? res.getHeader(fieldName) : "";
return res.getHeader ? res.getHeader(fieldName) : undefined;
}

@@ -35,0 +35,0 @@ getResField(res, fieldName) {

@@ -7,3 +7,3 @@ import { FrameworkService } from "../interfaces";

getResField(res: any, fieldName: string): any;
onResFinish(res: any, handler: () => void): undefined;
onResFinish(res: any, handler: () => void): void;
}

@@ -5,3 +5,3 @@ "use strict";

getReqHeaderField(req, fieldName) {
return req.header(fieldName);
return req.header ? req.header(fieldName) : undefined;
}

@@ -33,3 +33,3 @@ getReqField(req, fieldName) {

getResHeaderField(res, fieldName) {
return res.get(fieldName);
return res.get ? res.get(fieldName) : undefined;
}

@@ -36,0 +36,0 @@ getResField(res, fieldName) {

@@ -5,5 +5,5 @@ import { FrameworkService } from "../interfaces";

getReqField(req: any, fieldName: string): any;
getResHeaderField(res: any, fieldName: string): string;
getResHeaderField(res: any, fieldName: string): string | undefined;
getResField(res: any, fieldName: string): any;
onResFinish(res: any, handler: () => void): undefined;
onResFinish(res: any, handler: () => void): void;
}

@@ -32,3 +32,3 @@ "use strict";

getResHeaderField(res, fieldName) {
return res.getHeader(fieldName);
return res.getHeader ? res.getHeader(fieldName) : undefined;
}

@@ -35,0 +35,0 @@ getResField(res, fieldName) {

import { FrameworkService } from "../interfaces";
export default class HttpService implements FrameworkService {
getReqHeaderField(req: any, fieldName: string): string;
getReqHeaderField(req: any, fieldName: string): string | undefined;
getReqField(req: any, fieldName: string): any;
getResHeaderField(res: any, fieldName: string): string;
getResHeaderField(res: any, fieldName: string): string | undefined;
getResField(res: any, fieldName: string): any;
onResFinish(res: any, handler: () => void): undefined;
onResFinish(res: any, handler: () => void): void;
}
import { FrameworkService } from "../interfaces";
export default class RestifyService implements FrameworkService {
getReqHeaderField(req: any, fieldName: string): string;
getReqHeaderField(req: any, fieldName: string): string | undefined;
getReqField(req: any, fieldName: string): any;
getResHeaderField(res: any, fieldName: string): string;
getResHeaderField(res: any, fieldName: string): string | undefined;
getResField(res: any, fieldName: string): any;
onResFinish(res: any, handler: () => void): undefined;
onResFinish(res: any, handler: () => void): void;
}

@@ -5,3 +5,3 @@ "use strict";

getReqHeaderField(req, fieldName) {
return req.header(fieldName);
return req ? req.header(fieldName) : undefined;
}

@@ -8,0 +8,0 @@ getReqField(req, fieldName) {

@@ -6,3 +6,3 @@ export interface FrameworkService {

getResField(req: any, fieldName: string): string | number | boolean | undefined;
onResFinish(res: any, handler: () => void): undefined;
onResFinish(res: any, handler: () => void): void;
}

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

const levelUtils_1 = __importDefault(require("../helper/levelUtils"));
const logger_1 = __importDefault(require("../logger/logger"));
const logger_1 = require("../logger/logger");
const recordFactory_1 = __importDefault(require("../logger/recordFactory"));

@@ -24,3 +24,3 @@ const recordWriter_1 = __importDefault(require("../logger/recordWriter"));

// initialize Logger with parent to set registered fields
const networkLogger = new logger_1.default(parentLogger, context);
const networkLogger = new logger_1.Logger(parentLogger, context);
const jwtService = jwtService_1.default.getInstance();

@@ -51,5 +51,2 @@ const dynLogLevelHeader = jwtService.getDynLogLevelHeaderName();

responseAccessor_1.default.getInstance().onFinish(res, finishLog);
/* res.on("finish", finishLog);
res.on("header", finishLog);*/
next ? next() : null;

@@ -56,0 +53,0 @@ }

import TransportStream from 'winston-transport';
import Logger from '../logger/logger';
import { Logger } from '../logger/logger';
declare class CfNodejsLoggingSupportLogger extends TransportStream {

@@ -4,0 +4,0 @@ logger: Logger;

{
"name": "cf-nodejs-logging-support",
"version": "7.3.0-beta.2",
"version": "7.3.0",
"description": "Logging tool for Cloud Foundry",

@@ -46,2 +46,3 @@ "keywords": [

"express": "^4.18.2",
"fastify": "^4.26.1",
"import-fresh": "^3.3.0",

@@ -48,0 +49,0 @@ "mocha": "^9.2.2",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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