loopback4-logging
TypeScript icon, indicating that this package has built-in type declarations

0.0.4 • Public • Published

loopback4-logging

LoopBack

Installation

Install Loopback4LoggingComponent using npm;

$ [npm install | yarn add] loopback4-logging

Basic Use

Configure and load Loopback4LoggingComponent in the application constructor as shown below.

import {Loopback4LoggingComponent, Loopback4LoggingComponentOptions, DEFAULT_LOOPBACK4_LOGGING_OPTIONS} from 'loopback4-logging';
// ...
export class MyApplication extends BootMixin(ServiceMixin(RepositoryMixin(RestApplication))) {
  constructor(options: ApplicationConfig = {}) {
    const opts: Loopback4LoggingComponentOptions = DEFAULT_LOOPBACK4_LOGGING_OPTIONS;
    this.configure(Loopback4LoggingComponentBindings.COMPONENT).to(opts);
      // Put the configuration options here
    });
    this.component(Loopback4LoggingComponent);
    // ...
  }
  // ...
}

参考文档

item description
loopback4 component https://loopback.io/doc/en/lb4/Component.html
logging component https://github.com/loopbackio/loopback-next/tree/master/extensions/logging
logging component generator ??? https://loopback.io/doc/en/lb4/Extension-generator.html
组件的用法 lb3 vs lb4 https://loopback.io/doc/en/lb4/LB3-vs-LB4-request-response-cycle.html

Package Sidebar

Install

npm i loopback4-logging

Weekly Downloads

3

Version

0.0.4

License

none

Unpacked Size

144 kB

Total Files

160

Last publish

Collaborators

  • skypesky