Logger module for the Hapiness framework.
$ npm install --save @hapiness/core @hapiness/logger rxjs
or
$ yarn add @hapiness/core @hapiness/logger rxjs"dependencies": {"@hapiness/core": "^1.2.2","@hapiness/logger": "^1.1.0","rxjs": "^5.5.2",//...}//...import{Hapiness,HapinessModule,HttpServer,OnGet}from'@hapiness/core';import{LoggerModule,LoggerService}from'@hapiness/logger';
@HapinessModule({version: '1.0.0',imports: [LoggerModule]})classHapinessModuleApp{constructor(private_logger: LoggerService){this._logger.info('my data log');}}
@Route({method: 'get',path: '/test'})classMyRouteimplementsOnGet{constructor(private_logger: LoggerService){}onGet(request,reply){this._logger.warn('my data log');reply('test');}}// Define your loggerHapiness.bootstrap(HapinessModuleApp,[LoggerExt.setConfig({logger: myLogger})]);If HttpServerExt is loaded, the LoggerModule will inject an AccessLogs component. To desactivate the access logs, provide a module's config:
@HapinessModule({version: '1.0.0',imports: [LoggerModule.setConfig({accessLogs: false})]})classHapinessModuleApp{
...
}To set up your development environment:
- clone the repo to your workspace,
- in the shell
cdto the main folder, - hit
npm or yarn install, - run
npm or yarn run test.- It will lint the code and execute all tests.
- The test coverage report can be viewed from
./coverage/lcov-report/index.html.
- v1.1.0 (2017-11-20)
- Latest packages' versions.
- Documentation.
- Change packaging process.
- v1.0.0 (2017-10-26)
- Create LoggerModule
- Logger extension
- Logger provider
- Access logs
- Documentation
| Julien Fauville | Antoine Gomez | Sébastien Ritz | Nicolas Jessel |
Copyright (c) 2017 Hapiness Licensed under the MIT license.

