New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

nv-error-remote

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nv-error-remote

nv-error-remote =============== - format log for remote log-db

latest
npmnpm
Version
1.0.1
Version published
Maintainers
1
Created
Source

nv-error-remote

  • format log for remote log-db

install

  • npm install nv-error-remote

usage

const x = require("nv-error-remote")

example

    > x.log(new SyntaxError('xxx'),1001)
    {
      type: 'error',
      date: '2022-01-20 13:54:27.610',
      code: 1001,
      name: 'SyntaxError',
      message: 'xxx',
      stack: [
        'SyntaxError: xxx',
        '    at REPL2:1:7',
        '    at Script.runInThisContext (node:vm:129:12)',
        '    at REPLServer.defaultEval (node:repl:562:29)',
        '    at bound (node:domain:421:15)',
        '    at REPLServer.runBound [as eval] (node:domain:432:12)',
        '    at REPLServer.onLine (node:repl:889:10)',
        '    at REPLServer.emit (node:events:402:35)',
        '    at REPLServer.emit (node:domain:475:12)',
        '    at REPLServer.Interface._onLine (node:readline:487:10)',
        '    at REPLServer.Interface._line (node:readline:864:8)'
      ],
      signed_keys: [ 'code', 'name', 'message' ],
      sign: '60dc919c97758f6b254bb0438fc3fb371039963e',
      y: 2022,
      m: 1,
      d: 20,
      h: 13,
      min: 54,
      s: 27,
      ms: 610,
      ts: 1642658067,
      mts: 1642658067610,
      zone: '+0800',
      soffset: 28800,
      msoffset: 28800000,
      utc_wd: 'Thursday',
      lcl_wd: 'Thursday',
      extra: {}
    }



    > x.log('noerror',400)
    {
      type: 'info',
      date: '2022-01-20 14:02:42.327',
      code: 400,
      name: null,
      message: 'noerror',
      stack: [ '' ],
      signed_keys: [ 'code', 'name', 'message' ],
      sign: '4c48f2a218913feb68f35cd653e3516e8f251d2a',
      y: 2022,
      m: 1,
      d: 20,
      h: 14,
      min: 2,
      s: 42,
      ms: 327,
      ts: 1642658562,
      mts: 1642658562327,
      zone: '+0800',
      soffset: 28800,
      msoffset: 28800000,
      utc_wd: 'Thursday',
      lcl_wd: 'Thursday',
      extra: {}
    }
    >

APIS

    function log(o,code=null,extra={},zone='+0800',signed_keys=['code','name','message']) {

    function _creat_timed(zone='+0800') {

    function error(err,code=null,extra={},zone='+0800',signed_keys=['code','name','message']) {
    function info(msg,code=null,extra={},zone='+0800',signed_keys=['code','name','message']) {
    function warning(msg,code=null,extra={},zone='+0800',signed_keys=['code','name','message']) {

    function from_json(J) {

LICENSE

  • ISC

FAQs

Package last updated on 25 Jan 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts