Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

egg-logrotater

Package Overview
Dependencies
Maintainers
6
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

egg-logrotater - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

.autod.conf.js

63

package.json
{
"name": "egg-logrotater",
"version": "0.0.1",
"description": "egg plugin <egg-logrotater>",
"version": "0.0.2",
"description": "logrotater for egg",
"eggPlugin": {
"name": "logrotater"
},
"keywords": [
"egg",
"eggjs",
"egg-plugin"
"plugin"
],
"homepage": "https://github.com/eggjs/egg-logrotater",
"license": "MIT",
"author": "eggjs",
"contributors": [
"TZ <atian25@qq.com>",
"popomore <sakura9515@gmail.com>",
"fengmk2 <m@fengmk2.com>",
"dead-horse <heyiyu.deadhorse@gmail.com>"
],
"dependencies": {
"co": "^4.6.0",
"moment": "^2.14.1",
"mz": "^2.4.0"
},
"devDependencies": {
"egg-ci": "1",
"egg-bin": "1",
"egg": "0.0.5",
"egg-mock": "0.0.2",
"autod": "2",
"eslint": "3",
"eslint-config-egg": "3",
"should": "8",
"supertest": "1",
"glob": "6",
"pedding": "1"
},
"engines": {
"node": ">=4.0.0"
},
"scripts": {
"test": "npm run lint && npm run test-local",
"test-local": "egg-bin test",
"cov": "egg-bin cov",
"lint": "eslint --ext js . --fix",
"ci": "npm run lint && npm run cov",
"autod": "autod"
},
"ci": {
"version": "4, 6"
},
"repository": {
"type": "git",
"url": "git@github.com:eggjs/egg-logrotater.git"
}
}
"url": "git+https://github.com/eggjs/egg-logrotater.git"
},
"bugs": {
"url": "https://github.com/eggjs/egg/issues"
},
"homepage": "https://github.com/eggjs/egg-logrotater#readme",
"author": "tianyi.jiangty",
"license": "MIT"
}

@@ -1,1 +0,58 @@

# egg-logrotater - egg plugin
# egg-logrotater
[![NPM version][npm-image]][npm-url]
[![build status][travis-image]][travis-url]
[![Test coverage][codecov-image]][codecov-url]
[![David deps][david-image]][david-url]
[![Known Vulnerabilities][snyk-image]][snyk-url]
[![npm download][download-image]][download-url]
[npm-image]: https://img.shields.io/npm/v/egg-logrotater.svg?style=flat-square
[npm-url]: https://npmjs.org/package/egg-logrotater
[travis-image]: https://img.shields.io/travis/eggjs/egg-logrotater.svg?style=flat-square
[travis-url]: https://travis-ci.org/eggjs/egg-logrotater
[codecov-image]: https://img.shields.io/codecov/c/github/eggjs/egg-logrotater.svg?style=flat-square
[codecov-url]: https://codecov.io/github/eggjs/egg-logrotater?branch=master
[david-image]: https://img.shields.io/david/eggjs/egg-logrotater.svg?style=flat-square
[david-url]: https://david-dm.org/eggjs/egg-logrotater
[snyk-image]: https://snyk.io/test/npm/egg-logrotater/badge.svg?style=flat-square
[snyk-url]: https://snyk.io/test/npm/egg-logrotater
[download-image]: https://img.shields.io/npm/dm/egg-logrotater.svg?style=flat-square
[download-url]: https://npmjs.org/package/egg-logrotater
Log rotate plugin for egg, default rotate log files under `config.logger.rotateLogDirs`.Run by [egg-schedule](https://github.com/eggjs/egg-schedule)
## Install
```bash
$ npm i egg-logrotater
```
## Usage
- `plugin.js`
```js
exports.logrotater = true;
```
- `config.js`
```js
// if any files need rotate by file size, config here
exports.logrotater = {
filesRotateBySize: [], // Array for files path which need rotate.
maxFileSize: 60 * 1024 * 1024, // Max file size to judge if any file need rotate
maxFiles: 10, // pieces rotate by size
rotateDuration: 60000, // time interval to judge if any file need rotate
};
```
## Questions & Suggestions
Please open an issue [here](https://github.com/eggjs/egg/issues).
## License
[MIT](LICENSE)
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc