Winston http request logger for express which is loosely based on express-request-logger.
In an existing express project you can add the following configuration fragment to enable request logging to console, with colors while in development or test.
You can optionally specify a second argument to
create(logger, [format]) to customize the object sent to Winston:
:date- Timestamp of the request.
:statusCode- HTTP status code of the request.
:method- HTTP method (GET, POST, etc.)
:url[segment]- Segment of the URL requested (Refer to the url module for options).
:responseTime- Time it took for the response (in milliseconds).
:ip- The client's IP address (looks to
:userAgent- The client's browser agent (parsed with
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using grunt.
Copyright (c) 2013 Mark Wolfe
Licensed under the MIT license.