node-proxy-logger
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

description

this method is intended to display graphs call methods in the form of diagrams https://mermaid.js.org/ for your application

image

usage

For constructor:

import {proxyLogger} from "node-proxy-logger"

export default class ExampleController extends AbstractController {

  logs = [];

  constructor(options) {
    super(options)
    
    return proxyLogger(this, {
      regexExclude: /^(is|get|set|pushlog)/i,
      loopStart: 'Start',
      logMethod: 'pushLog'
    });
  }

  pushLog(message, data, group = 'graph') {
    this.logs.push({message, data, group})
  }
  
  index() {
    return 'hello world'
  }
}

For instance object:

import {proxyLogger} from "node-proxy-logger"
const exampleController = new proxyLogger(new ExampleController, {
	
})

exampleController.index();

Package Sidebar

Install

npm i node-proxy-logger

Weekly Downloads

0

Version

1.0.1

License

ISC

Unpacked Size

2.81 kB

Total Files

4

Last publish

Collaborators

  • kak