0
Fork 0
mirror of https://github.com/verdaccio/verdaccio.git synced 2024-12-16 21:56:25 -05:00

Merge pull request #424 from UnitedMarsupials/master

fix: add signal-handling to allow proper log-rotation.
This commit is contained in:
Juan Picado @jotadeveloper 2017-12-05 23:54:16 +01:00 committed by GitHub
commit 8e815e2353
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 0 deletions

View file

@ -93,6 +93,10 @@ function setup(logs) {
},
});
process.on('SIGUSR2', function() {
Logger.reopenFileStreams();
});
module.exports.logger = logger;
}

View file

@ -10,6 +10,8 @@ logs:
- {type: file, path: verdaccio.log, level: info}
```
Use `SIGUSR2` to notify the application, the log-file was rotated and it needs to reopen it.
### Configuration
Property | Type | Required | Example | Support | Description