mirror of
https://github.com/taobataoma/meanTorrent.git
synced 2026-01-17 12:52:22 +01:00
Adds the log options, and format to the Morgan middleware in the Express configuration. These options are defined in the environment configurations. The implementation derived from https://github.com/meanjs/mean/pull/254 by @lirantal, which somehow got overlooked when merging 0.4.0 into master. Added tests for the Logger configuration. Added the log settings to the Test env config. Added environment variables for the log settings in the Test & Production env configs. Moved the Morgan Express middleware outside of the NODE_ENV === 'development' check. Morgan should be used in all environments, and use the settings set in each env config. Changed the wording of the Stream option comments in the env configs. Added Rotating Logs functionality, and refactored the log Stream options. Added a new npm package, FileStreamRotator, for use with Morgan's rotating logs functionality. Also, refactored the log configuration tests to be more maintainable. Added more tests, and refactored test suite to use mock-fs.