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

@voiceflow/logger

Package Overview
Dependencies
Maintainers
27
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@voiceflow/logger - npm Package Compare versions

Comparing version 1.6.2 to 2.0.0

build/detailed.logger.d.ts

84

package.json
{
"name": "@voiceflow/logger",
"description": "Common logger for Voiceflow backend microservices",
"version": "1.6.2",
"version": "2.0.0",
"author": "Frank Gu <frank@voiceflow.com>",

@@ -15,41 +15,37 @@ "bugs": {

"dependencies": {
"@types/cls-hooked": "^4.3.1",
"@types/express-pino-logger": "^4.0.2",
"@voiceflow/pino": "6.11.2",
"@voiceflow/pino-pretty": "4.4.0",
"@zerollup/ts-transform-paths": "^1.7.18",
"cls-hooked": "^4.2.2",
"nanoid": "^3.1.20",
"pino-http": "5.3.0"
"colorette": "2.0.19",
"lodash.merge": "4.6.2",
"pino": "8.7.0",
"pino-http": "8.2.1",
"pino-pretty": "9.1.1",
"ts-pattern": "^4.0.5"
},
"devDependencies": {
"@commitlint/cli": "^11.0.0",
"@commitlint/config-conventional": "^11.0.0",
"@istanbuljs/nyc-config-typescript": "^1.0.1",
"@types/chai": "^4.2.11",
"@types/mocha": "^8.0.0",
"@typescript-eslint/eslint-plugin": "^3.6.1",
"@typescript-eslint/parser": "^3.6.1",
"@commitlint/cli": "17.1.2",
"@istanbuljs/nyc-config-typescript": "1.0.2",
"@types/chai": "4.3.3",
"@types/lodash.merge": "^4.6.7",
"@types/mocha": "9.1.1",
"@voiceflow/commitlint-config": "2.0.0",
"@voiceflow/eslint-config": "6.0.0",
"@voiceflow/git-branch-check": "1.2.3",
"@voiceflow/prettier-config": "1.0.6",
"chai": "^4.2.0",
"commitizen": "^4.2.3",
"cz-conventional-changelog": "3.3.0",
"depcheck": "^1.3.1",
"eslint": "^7.32.0",
"@voiceflow/eslint-config": "7.0.0",
"@voiceflow/git-branch-check": "1.4.0",
"@voiceflow/prettier-config": "1.2.1",
"@voiceflow/semantic-release-config": "1.1.0",
"@voiceflow/tsconfig": "1.4.8",
"chai": "4.3.6",
"commitizen": "4.2.5",
"cz-conventional-changelog": "^3.3.0",
"depcheck": "^1.4.3",
"eslint": "8.23.1",
"eslint-output": "^3.0.1",
"fixpack": "^4.0.0",
"husky": "^4.3.8",
"lint-staged": "^10.5.3",
"mocha": "^6.1.4",
"husky": "8.0.1",
"istanbul": "^0.4.5",
"lint-staged": "13.0.3",
"mocha": "10.0.0",
"nyc": "^15.1.0",
"prettier": "^1.18.2",
"prettier-eslint-cli": "^5.0.0",
"source-map-support": "^0.5.19",
"ts-mocha": "^7.0.0",
"ts-node": "^8.10.2",
"ttypescript": "^1.5.10",
"typescript": "^3.9.6"
"prettier": "2.7.1",
"ts-mocha": "10.0.0",
"tsc-alias": "1.7.0",
"typescript": "4.8.3"
},

@@ -64,22 +60,22 @@ "files": [

"license": "ISC",
"main": "build/index.js",
"main": "build/main.js",
"prettier": "@voiceflow/prettier-config",
"repository": "git@github.com:voiceflow/logger.git",
"scripts": {
"build": "yarn clean && ttsc --project ./tsconfig.build.json",
"build": "yarn clean && tsc -p tsconfig.build.json && tsc-alias -p tsconfig.build.json",
"clean": "rimraf build",
"commit": "cz",
"eslint-output": "eslint-output",
"lint": "eslint \"./**/*.{js,ts}\"",
"lint:fix": "yarn lint --fix",
"lint": "eslint '**/*.{js,ts}'",
"lint:output": "yarn run eslint-output --quiet \"**/*.{js,ts}\"",
"lint:quiet": "yarn lint --quiet",
"lint:report": "yarn lint:output",
"tdd": "yarn test --watch",
"test": "yarn test:run",
"test:dependencies": "depcheck",
"test:integration": "NODE_ENV=test nyc --report-dir nyc_coverage_integration ts-mocha --paths --opts ./config/tests/mocha.opts 'tests/**/*.it.{ts,js}'",
"test:run": "NODE_ENV=test nyc ts-mocha --paths --opts ./config/tests/mocha.opts 'tests/**/*.{unit,it}.{ts,js}'",
"test:single": "NODE_ENV=test nyc ts-mocha --paths --opts ./config/tests/mocha.opts",
"test:unit": "NODE_ENV=test nyc --report-dir=nyc_coverage_unit ts-mocha --paths --opts ./config/tests/mocha.opts 'tests/**/*.unit.{ts,js}'"
}
"test:integration": "NODE_ENV=test nyc --report-dir nyc_coverage_integration ts-mocha --paths --config ./config/test/.mocharc.yml 'test/**/*.it.ts'",
"test:run": "NODE_ENV=test nyc ts-mocha --paths --config ./config/test/.mocharc.yml 'test/**/*.{unit,it}.ts'",
"test:single": "NODE_ENV=test ts-mocha --paths --config ./config/test/.mocharc.yml",
"test:unit": "NODE_ENV=test nyc --report-dir=nyc_coverage_unit ts-mocha --paths --config ./config/test/.mocharc.yml 'test/**/*.unit.ts'"
},
"types": "build/main.d.ts"
}
[![circle ci](https://circleci.com/gh/voiceflow/logger.svg?style=shield&circle-token=8c4e4ce8d04d87f16e903bd7e1ccab194a118262)](https://circleci.com/gh/voiceflow/logger)
[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=voiceflow_logger&metric=coverage)](https://sonarcloud.io/dashboard?id=voiceflow_logger)
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=voiceflow_logger&metric=alert_status)](https://sonarcloud.io/dashboard?id=voiceflow_logger)
# logger
Author: Frank Gu <<frank@voicelfow.com>>
Date: Dec 11, 2019
A standardized package for logging built on `pino`.
A logging package for VERY fast and useful JSON logging.
- All log entries go to `process.stdout`
- Minimal overhead and no logger hierarchies
- Multiple instantiations allowed
## Usage
```javascript
const Logger = require('@voiceflow/logger').default;
// or
import Logger from '@voiceflow/logger';
```ts
import { createLogger, LogLevel, LogFormat } from '@voiceflow/logger';
const defaultOptions = {
level: 'info',
pretty: false,
};
const logger = createLogger({ format: LogFormat.JSON, level: LogLevel.INFO });
const overrideOptions = {
level: 'trace', // Minimum log-level to be printed
pretty: true, // Pretty print
};
const inlineLogger = createLogger({ format: LogFormat.INLINE, level: LogLevel.WARN });
const defaultLogger = new Logger(); // Default options
const customLogger = new Logger(overrideOptions);
const detailedLogger = createLogger({ format: LogFormat.DETAILED, level: LogLevel.TRACE });
defaultLogger.trace('this is a trace');
defaultLogger.debug('this is a debug');
defaultLogger.info('this is an info');
defaultLogger.warn('this is a warning');
defaultLogger.error('this is an error');
defaultLogger.fatal('this is a fatal');
customLogger.trace('this is a trace');
customLogger.debug('this is a debug');
customLogger.info('this is an info');
customLogger.warn('this is a warning');
customLogger.error('this is an error');
customLogger.fatal('this is a fatal');
logger.trace('this is a trace log');
logger.debug('this is a debug log');
logger.info('this is an info log');
logger.warn('this is a warning log');
logger.error('this is an error log');
logger.fatal('this is a fatal log');
```
### Development Assitance
- For `warn` logs, the calling function and line number is included
- For `error` and `fatal` logs, the full call-stack is included
### Pretty Printing
Pretty printing will add colors, parse unix epoch timestamps into UTC time.
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