Skip to content
Snippets Groups Projects
Commit 90e0ac89 authored by Lloyd Hilaiel's avatar Lloyd Hilaiel
Browse files

in production (dev/beta/prod) use a more conventional logging format that...

in production (dev/beta/prod) use a more conventional logging format that includes timestamps.  closes #234
parent c08ea12b
No related branches found
No related tags found
No related merge requests found
......@@ -213,7 +213,7 @@ function router(app) {
// request to logger, dev formatted which omits personal data in the requests
app.use(express.logger({
format: 'dev',
format: config.get('express_log_format'),
stream: {
write: function(x) {
logger.info(typeof x === 'string' ? x.trim() : x);
......
......@@ -57,7 +57,7 @@ var app = express.createServer();
// our server will log
app.use(express.logger({
format: 'dev',
format: config.get('express_log_format'),
stream: {
write: function(x) {
logger.info(typeof x === 'string' ? x.trim() : x);
......
......@@ -54,6 +54,7 @@ var app = express.createServer();
// request to logger, dev formatted which omits personal data in the requests
app.use(express.logger({
format: config.get('express_log_format'),
stream: {
write: function(x) {
logger.info(typeof x === 'string' ? x.trim() : x);
......
......@@ -202,6 +202,8 @@ exports.performSubstitution = function(app) {
}
};
g_config['express_log_format'] = (exports.get('env') === 'production' ? 'default' : 'dev');
// At the time this file is required, we'll determine the "process name" for this proc
// if we can determine what type of process it is (browserid or verifier) based
// on the path, we'll use that, otherwise we'll name it 'ephemeral'.
......
......@@ -38,7 +38,7 @@
* A very thin wrapper around winston for general server logging.
* Exports a winston Logger instance in exports.logger with several functions
* corresponding to different log levels. use it like this:
*
*
* const logger = require('../libs/logging.js').logger;
* logger.debug("you can probably ignore this. just for debugging.");
* logger.info("something happened, here's info about it!");
......
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