some jsstyle'in
This commit is contained in:
parent
f3fcc9c7ca
commit
947b465118
1 changed files with 6 additions and 3 deletions
|
@ -942,7 +942,8 @@ Logger.stdSerializers = {};
|
|||
|
||||
// Serialize an HTTP request.
|
||||
Logger.stdSerializers.req = function req(req) {
|
||||
if (!req || !req.connection) return req;
|
||||
if (!req || !req.connection)
|
||||
return req;
|
||||
return {
|
||||
method: req.method,
|
||||
url: req.url,
|
||||
|
@ -959,7 +960,8 @@ Logger.stdSerializers.req = function req(req) {
|
|||
|
||||
// Serialize an HTTP response.
|
||||
Logger.stdSerializers.res = function res(res) {
|
||||
if (!res || !res.statusCode) return res;
|
||||
if (!res || !res.statusCode)
|
||||
return res;
|
||||
return {
|
||||
statusCode: res.statusCode,
|
||||
header: res._header
|
||||
|
@ -969,7 +971,8 @@ Logger.stdSerializers.res = function res(res) {
|
|||
// Serialize an Error object
|
||||
// (Core error properties are enumerable in node 0.4, not in 0.6).
|
||||
var errSerializer = Logger.stdSerializers.err = function err(err) {
|
||||
if (!err || !err.stack) return err;
|
||||
if (!err || !err.stack)
|
||||
return err;
|
||||
var obj = {
|
||||
message: err.message,
|
||||
name: err.name,
|
||||
|
|
Loading…
Reference in a new issue