1.1.1 • Published 5 years ago

egg-syslog v1.1.1

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

egg-syslog

NPM version build status Test coverage David deps Known Vulnerabilities npm download

Install

$ npm i egg-syslog --save

Usage

// {app_root}/config/plugin.js
exports.syslog = {
  enable: true,
  package: 'egg-syslog'
};

Configuration

// {app_root}/config/config.default.js
exports.syslog = {
  appName: 'your-app-name',
  hostName: 'your-host-name',
  host: 'your-host',
  port: 'your-port',
  level: 'INFO',
  aliyun: {
    project: 'your-project-name',
    logstore: 'your-logstore-name',
    accessKeyId: 'accessKeyId',
    accsssKeySecret: 'accsssKeySecret'
  }
};

see config/config.default.js for more detail.

Example

use ctx.logger or app.logger to send msg

// send a info message by info level
ctx.logger.info('message');
// or
app.logger.info('message');

Questions & Suggestions

Please open an issue here.

License

MIT

1.1.1

5 years ago

1.1.0

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago