Skip to content
Snippets Groups Projects
Commit 8744367e authored by Markus Grigull's avatar Markus Grigull
Browse files

Log git commit and branch

parent 6db52d74
No related branches found
No related tags found
No related merge requests found
......@@ -10,6 +10,7 @@
"express": "^4.14.0",
"express-winston": "^2.4.0",
"formidable": "^1.0.17",
"git-rev-sync": "^1.9.1",
"jsonwebtoken": "^7.0.1",
"mongoose": "^4.5.1",
"winston": "^2.3.1"
......
......@@ -26,6 +26,7 @@ var bodyParser = require('body-parser');
var cors = require('cors');
var winston = require('winston');
var expressWinston = require('express-winston');
var git = require('git-rev-sync');
// local include
var logger = require('./utils/logger');
......@@ -64,6 +65,7 @@ if (config.logFile) {
}
logger.info('--- Started VILLASweb backend ---');
logger.info('Branch: ' + git.branch() + ', Commit: ' + git.short());
// configure app
app.use(expressWinston.logger({ winstonInstance: logger }));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment