Skip to content

anshiksf/logger

Repository files navigation

logger

LoopBack

Installation

Install LoggerComponent using npm;

$ [npm install | yarn add] logger

Basic Use

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

import {LoggerComponent, LoggerComponentOptions, DEFAULT_LOGGER_OPTIONS} from 'logger';
// ...
export class MyApplication extends BootMixin(ServiceMixin(RepositoryMixin(RestApplication))) {
  constructor(options: ApplicationConfig = {}) {
    const opts: LoggerComponentOptions = DEFAULT_LOGGER_OPTIONS;
    this.configure(LoggerComponentBindings.COMPONENT).to(opts);
      // Put the configuration options here
    });
    this.component(LoggerComponent);
    // ...
  }
  // ...
}

About

This is the winston logger assignment

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published