Skip to content

Commit

Permalink
Requests logs now also pad method to 5 spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
ravi-nextbit committed May 10, 2017
1 parent 7997b93 commit e82d673
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion index.js
Expand Up @@ -6,6 +6,8 @@ const path = require('path');
const winston = require('winston');


// TODO File logging does not default to rollingFile logging, and instead just creates one giant file

const cwd = process.cwd();
colors.enabled = true;
const transportDefaults = {
Expand Down Expand Up @@ -141,7 +143,7 @@ class Logger {
module.exports.requests.info(
'%s %s id:%s in:%s out:%s time:%s %s (%s/%s)',
res.statusCode,
req.method,
_.padEnd(req.method, 5),
_.padEnd(req.id, 10),
_.padEnd(req.socket.bytesRead, 5),
_.padEnd(req.socket.bytesWritten, 5),
Expand Down
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "@cheevr/logging",
"version": "1.1.1",
"version": "1.1.2",
"description": "A simple logging wrapper around winstin",
"main": "index.js",
"repository": {
Expand Down

0 comments on commit e82d673

Please sign in to comment.