summaryrefslogtreecommitdiff
path: root/lib/logger.js (unfollow)
Commit message (Collapse)AuthorFilesLines
2018-11-16Fix streaming for winstonSheogorath1-1/+9
During the upgrade of winston in c3584770f24205d84b9399abd9535cb27dc7b00c a the class extension for streaming was removed. This caused silent crashes. Somehow winston simply called `process.exit(1)` whenever `logger.write()` was called. This is really bad and only easy to debug because of the testing right after upgrading. However, reimplementing the stream interface as it was, didn't work, due to the fact that `logger.write()` is already implemented and causes the mentioned problem. So we extent the object with an `stream` object that implements `write()` for streams and pass that to morgan. So this patch fixes unexpected exiting for streaming towards our logging module. References: https://www.digitalocean.com/community/tutorials/how-to-use-winston-to-log-node-js-applications https://github.com/hackmdio/codimd/commit/c3584770f24205d84b9399abd9535cb27dc7b00c https://stackoverflow.com/a/28824464 Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
2018-11-14Upgrade winstonSheogorath1-16/+12
Our log library got a new major version which should be implemented. That's exactly what this patch does. Implementing the new version of the logging library. Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
2017-05-08refactor(logger): Refactor logger.jsBoHong Li1-11/+11
Use class style implement write interface
2017-03-14Use strict mode in all backend filesBoHong Li1-0/+1
add ‘use strict’ in all backend file
2017-03-08Use JavaScript Standard StyleBoHong Li1-18/+18
Introduce JavaScript Standard Style as project style rule, and fixed all fail on backend code.
2015-07-02Jump to 0.3.1Wu Cheng-Han1-1/+2
2015-06-01Marked as 0.2.9Wu Cheng-Han1-0/+21