|
@ -135,12 +135,12 @@ function localWebServer (options) { |
|
|
if (!log.format) { |
|
|
if (!log.format) { |
|
|
const streamLogStats = require('stream-log-stats') |
|
|
const streamLogStats = require('stream-log-stats') |
|
|
log.options.stream = streamLogStats({ refreshRate: 500 }) |
|
|
log.options.stream = streamLogStats({ refreshRate: 500 }) |
|
|
app.use(morgan.middleware('common', log.options)) |
|
|
|
|
|
|
|
|
app.use(morgan('common', log.options)) |
|
|
} else if (log.format === 'logstalgia') { |
|
|
} else if (log.format === 'logstalgia') { |
|
|
morgan.token('date', logstalgiaDate) |
|
|
morgan.token('date', logstalgiaDate) |
|
|
app.use(morgan.middleware('combined', log.options)) |
|
|
|
|
|
|
|
|
app.use(morgan('combined', log.options)) |
|
|
} else { |
|
|
} else { |
|
|
app.use(morgan.middleware(log.format, log.options)) |
|
|
|
|
|
|
|
|
app.use(morgan(log.format, log.options)) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|