some jsstyle'in

This commit is contained in:
Trent Mick 2012-08-07 22:34:46 -07:00
parent f3fcc9c7ca
commit 947b465118

View file

@ -942,7 +942,8 @@ Logger.stdSerializers = {};
// Serialize an HTTP request. // Serialize an HTTP request.
Logger.stdSerializers.req = function req(req) { Logger.stdSerializers.req = function req(req) {
if (!req || !req.connection) return req; if (!req || !req.connection)
return req;
return { return {
method: req.method, method: req.method,
url: req.url, url: req.url,
@ -959,7 +960,8 @@ Logger.stdSerializers.req = function req(req) {
// Serialize an HTTP response. // Serialize an HTTP response.
Logger.stdSerializers.res = function res(res) { Logger.stdSerializers.res = function res(res) {
if (!res || !res.statusCode) return res; if (!res || !res.statusCode)
return res;
return { return {
statusCode: res.statusCode, statusCode: res.statusCode,
header: res._header header: res._header
@ -969,7 +971,8 @@ Logger.stdSerializers.res = function res(res) {
// Serialize an Error object // Serialize an Error object
// (Core error properties are enumerable in node 0.4, not in 0.6). // (Core error properties are enumerable in node 0.4, not in 0.6).
var errSerializer = Logger.stdSerializers.err = function err(err) { var errSerializer = Logger.stdSerializers.err = function err(err) {
if (!err || !err.stack) return err; if (!err || !err.stack)
return err;
var obj = { var obj = {
message: err.message, message: err.message,
name: err.name, name: err.name,