egg-logrotater
Advanced tools
Comparing version 0.0.1 to 0.0.2
{ | ||
"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) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Empty package
Supply chain riskPackage does not contain any code. It may be removed, is name squatting, or the result of a faulty package publish.
Found 1 instance in 1 package
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
890398
40
57725
1
59
3
11
1
2
+ Addedco@^4.6.0
+ Addedmoment@^2.14.1
+ Addedmz@^2.4.0
+ Addedany-promise@1.3.0(transitive)
+ Addedco@4.6.0(transitive)
+ Addedmoment@2.30.1(transitive)
+ Addedmz@2.7.0(transitive)
+ Addedobject-assign@4.1.1(transitive)
+ Addedthenify@3.3.1(transitive)
+ Addedthenify-all@1.6.0(transitive)