Giter Club home page Giter Club logo

morgan's Introduction

morgan

NPM Version NPM Downloads Build Status Test Coverage

HTTP request logger middleware for node.js

Named after Dexter, a show you should not watch until completion.

Installation

This is a Node.js module available through the npm registry. Installation is done using the npm install command:

$ npm install morgan

API

var morgan = require('morgan')

morgan(format, options)

Create a new morgan logger middleware function using the given format and options. The format argument may be a string of a predefined name (see below for the names), a string of a format string, or a function that will produce a log entry.

The format function will be called with three arguments tokens, req, and res, where tokens is an object with all defined tokens, req is the HTTP request and res is the HTTP response. The function is expected to return a string that will be the log line, or undefined / null to skip logging.

Using a predefined format string

morgan('tiny')

Using format string of predefined tokens

morgan(':method :url :status :res[content-length] - :response-time ms')

Using a custom format function

morgan(function (tokens, req, res) {
  return [
    tokens.method(req, res),
    tokens.url(req, res),
    tokens.status(req, res),
    tokens.res(req, res, 'content-length'), '-',
    tokens['response-time'](req, res), 'ms'
  ].join(' ')
})

Options

Morgan accepts these properties in the options object.

immediate

Write log line on request instead of response. This means that a requests will be logged even if the server crashes, but data from the response (like the response code, content length, etc.) cannot be logged.

skip

Function to determine if logging is skipped, defaults to false. This function will be called as skip(req, res).

// EXAMPLE: only log error responses
morgan('combined', {
  skip: function (req, res) { return res.statusCode < 400 }
})
stream

Output stream for writing log lines, defaults to process.stdout.

Predefined Formats

There are various pre-defined formats provided:

combined

Standard Apache combined log output.

:remote-addr - :remote-user [:date[clf]] ":method :url HTTP/:http-version" :status :res[content-length] ":referrer" ":user-agent"
common

Standard Apache common log output.

:remote-addr - :remote-user [:date[clf]] ":method :url HTTP/:http-version" :status :res[content-length]
dev

Concise output colored by response status for development use. The :status token will be colored green for success codes, red for server error codes, yellow for client error codes, cyan for redirection codes, and uncolored for information codes.

:method :url :status :response-time ms - :res[content-length]
short

Shorter than default, also including response time.

:remote-addr :remote-user :method :url HTTP/:http-version :status :res[content-length] - :response-time ms
tiny

The minimal output.

:method :url :status :res[content-length] - :response-time ms

Tokens

Creating new tokens

To define a token, simply invoke morgan.token() with the name and a callback function. This callback function is expected to return a string value. The value returned is then available as ":type" in this case:

morgan.token('type', function (req, res) { return req.headers['content-type'] })

Calling morgan.token() using the same name as an existing token will overwrite that token definition.

The token function is expected to be called with the arguments req and res, representing the HTTP request and HTTP response. Additionally, the token can accept further arguments of it's choosing to customize behavior.

:date[format]

The current date and time in UTC. The available formats are:

  • clf for the common log format ("10/Oct/2000:13:55:36 +0000")
  • iso for the common ISO 8601 date time format (2000-10-10T13:55:36.000Z)
  • web for the common RFC 1123 date time format (Tue, 10 Oct 2000 13:55:36 GMT)

If no format is given, then the default is web.

:http-version

The HTTP version of the request.

:method

The HTTP method of the request.

:referrer

The Referrer header of the request. This will use the standard mis-spelled Referer header if exists, otherwise Referrer.

:remote-addr

The remote address of the request. This will use req.ip, otherwise the standard req.connection.remoteAddress value (socket address).

:remote-user

The user authenticated as part of Basic auth for the request.

:req[header]

The given header of the request. If the header is not present, the value will be displayed as "-" in the log.

:res[header]

The given header of the response. If the header is not present, the value will be displayed as "-" in the log.

:response-time[digits]

The time between the request coming into morgan and when the response headers are written, in milliseconds.

The digits argument is a number that specifies the number of digits to include on the number, defaulting to 3, which provides microsecond precision.

:status

The status code of the response.

If the request/response cycle completes before a response was sent to the client (for example, the TCP socket closed prematurely by a client aborting the request), then the status will be empty (displayed as "-" in the log).

:total-time[digits]

The time between the request coming into morgan and when the response has finished being written out to the connection, in milliseconds.

The digits argument is a number that specifies the number of digits to include on the number, defaulting to 3, which provides microsecond precision.

:url

The URL of the request. This will use req.originalUrl if exists, otherwise req.url.

:user-agent

The contents of the User-Agent header of the request.

morgan.compile(format)

Compile a format string into a format function for use by morgan. A format string is a string that represents a single log line and can utilize token syntax. Tokens are references by :token-name. If tokens accept arguments, they can be passed using [], for example: :token-name[pretty] would pass the string 'pretty' as an argument to the token token-name.

The function returned from morgan.compile takes three arguments tokens, req, and res, where tokens is object with all defined tokens, req is the HTTP request and res is the HTTP response. The function will return a string that will be the log line, or undefined / null to skip logging.

Normally formats are defined using morgan.format(name, format), but for certain advanced uses, this compile function is directly available.

Examples

express/connect

Sample app that will log all request in the Apache combined format to STDOUT

var express = require('express')
var morgan = require('morgan')

var app = express()

app.use(morgan('combined'))

app.get('/', function (req, res) {
  res.send('hello, world!')
})

vanilla http server

Sample app that will log all request in the Apache combined format to STDOUT

var finalhandler = require('finalhandler')
var http = require('http')
var morgan = require('morgan')

// create "middleware"
var logger = morgan('combined')

http.createServer(function (req, res) {
  var done = finalhandler(req, res)
  logger(req, res, function (err) {
    if (err) return done(err)

    // respond to request
    res.setHeader('content-type', 'text/plain')
    res.end('hello, world!')
  })
})

write logs to a file

single file

Sample app that will log all requests in the Apache combined format to the file access.log.

var express = require('express')
var fs = require('fs')
var morgan = require('morgan')
var path = require('path')

var app = express()

// create a write stream (in append mode)
var accessLogStream = fs.createWriteStream(path.join(__dirname, 'access.log'), { flags: 'a' })

// setup the logger
app.use(morgan('combined', { stream: accessLogStream }))

app.get('/', function (req, res) {
  res.send('hello, world!')
})

log file rotation

Sample app that will log all requests in the Apache combined format to one log file per day in the log/ directory using the rotating-file-stream module.

var express = require('express')
var morgan = require('morgan')
var path = require('path')
var rfs = require('rotating-file-stream') // version 2.x

var app = express()

// create a rotating write stream
var accessLogStream = rfs.createStream('access.log', {
  interval: '1d', // rotate daily
  path: path.join(__dirname, 'log')
})

// setup the logger
app.use(morgan('combined', { stream: accessLogStream }))

app.get('/', function (req, res) {
  res.send('hello, world!')
})

split / dual logging

The morgan middleware can be used as many times as needed, enabling combinations like:

  • Log entry on request and one on response
  • Log all requests to file, but errors to console
  • ... and more!

Sample app that will log all requests to a file using Apache format, but error responses are logged to the console:

var express = require('express')
var fs = require('fs')
var morgan = require('morgan')
var path = require('path')

var app = express()

// log only 4xx and 5xx responses to console
app.use(morgan('dev', {
  skip: function (req, res) { return res.statusCode < 400 }
}))

// log all requests to access.log
app.use(morgan('common', {
  stream: fs.createWriteStream(path.join(__dirname, 'access.log'), { flags: 'a' })
}))

app.get('/', function (req, res) {
  res.send('hello, world!')
})

use custom token formats

Sample app that will use custom token formats. This adds an ID to all requests and displays it using the :id token.

var express = require('express')
var morgan = require('morgan')
var uuid = require('node-uuid')

morgan.token('id', function getId (req) {
  return req.id
})

var app = express()

app.use(assignId)
app.use(morgan(':id :method :url :response-time'))

app.get('/', function (req, res) {
  res.send('hello, world!')
})

function assignId (req, res, next) {
  req.id = uuid.v4()
  next()
}

License

MIT

morgan's People

Contributors

allanbikundo avatar badrmodoukh avatar beeman avatar boushley avatar cattail avatar davidjb avatar dougwilson avatar fishrock123 avatar fvictorio avatar indexzero avatar jonathanong avatar kamranayub avatar mikeralphson avatar peterdavehello avatar pixnbits avatar ryhinchey avatar thislooksfun avatar ytfei avatar zicai avatar ziyaddin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

morgan's Issues

Ignore socket.io poll

Hey there awesome dudes,

I LOVE THIS LIBRARY.

I just implemented socket.io on my server, and now I see this log all the stinking time:

Wed, 15 Apr 2015 15:27:14 GMT - GET /socket.io/?EIO=3&transport=polling&t=1429111634816-32&b64=1 responded 404 in 0.177 ms

Is there a way to ignore logs with a url that contains /socket.io? Thanks!

Examples outdated ?

it seems morgan no longer support two arguments

This example in the readme is outdated...

// create a write stream (in append mode)
var accessLogStream = fs.createWriteStream(__dirname + '/access.log', {flags: 'a'})

// setup the logger
app.use(morgan('combined', {stream: accessLogStream}))

// shoud be
app.use(morgan({
  format: 'combined',
  stream: accessLogStream
}));

json format

I would like to use morgan with another logger. I'm doing this like so

app.use(morgan("combined",{
    "stream": {
        write: function(str) {
            logger.debug(str);
        }
    }
}));

Instead of parsing the string, would it be possible to add a 'json' format to morgan?

Streaming JSON logs to Loggly

Not an issue but a question - I can get my logs out to Loggly using this code as a hypothetical. However I am struggling to figure out how to pass nice JSON-formatted messages to Loggly which I think will make the service easier for me to use. Does anyone have a good working example of how to use morgan to create nice JSON output (and pass to Loggly)?

if (app.get('env') === 'production') {

  var loggly = require('loggly');

  var client = loggly.createClient({
    token: 'my-token',
    subdomain: 'something',
    tags: ['NodeJS'],
    json: true
  });

  // Stream Express Logging to Loggly
  app.use(logger('short', {
    stream: {
      write: function (message, encoding) {
        client.log(message);
      }
    }
  }));

}

something like this:

{
    "IP_ADDRESS": "127.0.0.1",
    "METHOD": "GET",
    "URL": "/api/lastfm",
   ... (you get the idea)
}

Stop express polluting the logs

Is there a way to stop express from polluting the logs?

My configuration looks like this (but I have tried with all of the defaults):

var morgan  = require('morgan');
...
app.use(morgan('dev'));

I get something like the following, for each request when I'm only really interested in seeing the last line. Is there a way that I can filter out all of the lines that contain "express:router"?

Sun, 27 Apr 2014 09:20:15 GMT express:router dispatching GET /favicon.ico
Sun, 27 Apr 2014 09:20:15 GMT express:router trim prefix () from url /favicon.ico
Sun, 27 Apr 2014 09:20:15 GMT express:router query  : /favicon.ico
Sun, 27 Apr 2014 09:20:15 GMT express:router trim prefix () from url /favicon.ico
Sun, 27 Apr 2014 09:20:15 GMT express:router expressInit  : /favicon.ico
Sun, 27 Apr 2014 09:20:15 GMT express:router trim prefix () from url /favicon.ico
Sun, 27 Apr 2014 09:20:15 GMT express:router logger  : /favicon.ico
Sun, 27 Apr 2014 09:20:15 GMT express:router trim prefix () from url /favicon.ico
Sun, 27 Apr 2014 09:20:15 GMT express:router anonymous  : /favicon.ico
Sun, 27 Apr 2014 09:20:15 GMT express:router trim prefix () from url /favicon.ico
Sun, 27 Apr 2014 09:20:15 GMT express:router compress  : /favicon.ico
Sun, 27 Apr 2014 09:20:15 GMT express:router trim prefix () from url /favicon.ico
Sun, 27 Apr 2014 09:20:15 GMT express:router cookieParser  : /favicon.ico
Sun, 27 Apr 2014 09:20:15 GMT express:router trim prefix () from url /favicon.ico
Sun, 27 Apr 2014 09:20:15 GMT express:router session  : /favicon.ico
Sun, 27 Apr 2014 09:20:15 GMT express:router trim prefix () from url /favicon.ico
Sun, 27 Apr 2014 09:20:15 GMT express:router anonymous  : /favicon.ico
Sun, 27 Apr 2014 09:20:15 GMT express:router trim prefix () from url /favicon.ico
Sun, 27 Apr 2014 09:20:15 GMT express:router bodyParser  : /favicon.ico
Sun, 27 Apr 2014 09:20:15 GMT express:router trim prefix () from url /favicon.ico
Sun, 27 Apr 2014 09:20:15 GMT express:router staticMiddleware  : /favicon.ico
GET /favicon.ico 304 2ms

Any feedback would be appreciated.

name

wtf haha just saw this in a blog post, the names are super awkward, It would be almost better to just have express-logger over something obscure like morgan, not a fan of that. Personally I think they'd all be better off as express-* or connect-* than bad names

Does 'response-time' include time to send response to client?

While the documentation says this about response-time:

The time between the request coming into morgan and when the response headers are written, in milliseconds.

We have noticed that latent / far away clients record higher response times than closer ones, making this number difficult to use for any sort of performance monitoring.

It appears that the module on-finished only calls back when the response has been completely written, acked and closed.

Am I correct on this? If so, would it make sense to write a PR to either fix response-time or add another token that ignores client latency?

More response-sizes

When using in combination with e.g. compression-middleware, the logger doen't output response sizes by default, since a "content-length"-header isn't there...

Is there a proper way to use, or auto-fallback to something like req.socket.bytesWritten, to get a better picture of response sizes?

Format bytes using module `bytes`

In the line 12, morgan requires bytes module, but never used.

Shall we use it for formatting 'Content-Length' header like this?

exports.token('res', function(req, res, field){
  var result = (res._headers || {})[field.toLowerCase()];
  if (result && field.toLowerCase() === 'content-length') {
    var len = parseInt(result, 10);
    return bytes(len);
  }
  else
    return result;
});

I found this issue when I upgraded the express version.

Ordering of log lines

Often the log lines get out of order, or one request will be fully coloured green like the 200 request colour. I'm guessing this is due to the async nature of the console, just alerting you to it.
2015_04_20_11_02_28_c_windows_system32_cmd exe_server_remote bat_

Feature request: log both before & after the request

The usual request loggers log after the request was responded, because at this point we have all the data: response time, return code, etc... This is what morgan does by default.

But for debug purpose it's often useful to have a log entry when the request was just received, morgan also provides this feature with the immediate flag.

However, what we really need when debugging it immediate log and all the response information. The only way to implement this is to log two times: one like immediate, and one like the default.
We then need something to correlate both logs (a correlation id: a counter, or some other thing).
And finally: something to distinguish between both logs entries (a visual clue like a prefix).

Without this feature the immediate feature is usually useless. Or am I missing a standard use-case?

Reopen the log files, Error: write after end

I tried to reopen the log files but I got 'Error: write after end'.
Does morgan have the function for reopening logger?

var logger = require('morgan');

var accessLogStream = fs.createWriteStream(__dirname + '/access.log', {flags: 'a' });
app.use((logger('dev', { stream: accessLogStream })));

process.on('SIGUSR2', function() {
  console.log('Reopen the log files');
  accessLogStream.removeAllListeners();
  accessLogStream.end();
  accessLogStream.close();
  accessLogStream = fs.createWriteStream(__dirname + '/access.log', {flags: 'a' });
});
Reopen the log files
[Error: write after end]
[Error: write after end]

Add protocol token

If you're running a HTTP and HTTPS server side by side, it would be nice to differentiate their requests in the log. As far as I can see this isn't possible at the moment. I will submit a PR.

add text next to a token without needing a space

It would be cool if there was a way to add text next to a token without needing a space or needing to figure out how to rewrite the token so that it includes the text.

For ex:

app.use(logger(':method :status :url :response-time ms :res[content-length]'));

What if I want to remove the space between the ms and the :repsonse-time without rewritting the token? Is there a way to do this? Thanks.

Heroku: Cannot find module 'debug'

I'm struggling to deploy my server to Heroku. Below you see the result of running node from the Heroku CLI, and trying to require morgan. I'm getting the same issue in my logs and it is preventing the app from unless I comment out morgan.

> var morgan     = require("morgan");
Error: Cannot find module 'debug'
    at Function.Module._resolveFilename (module.js:336:15)
    at Function.Module._load (module.js:278:25)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at Object.<anonymous> (/app/node_modules/morgan/index.js:16:13)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)

Line 16 of index.js reads var debug = require('debug')('morgan')

Weirdly, everything runs fine on my development machine at home

JSON log format

What is the best way to write out JSON to stdout? For example:

{
    "date": "2015-05-30T13:55:36.000Z",
    "http_version": "1.1",
    "method": "GET",
    "url": "/",
    "status": 200,
    "response_time": 75.564,
    "remote_user": null,
    "remote_addr": "43.34.54.121",
    "user_agent": "curl/7.37.1",
    "referrer": null
}

Passing skip function not working

I'm trying to get morgan to only print requests with a certain status code in conjunction with Express 4.

Docs say to do this:

// EXAMPLE: only log error responses
morgan('combined', {
    skip: function (req, res) { return res.statusCode < 400 }
})

My code:

var express = require('express');
var morgan = require('morgan');

var app = express();
app.use(morgan('dev', {
    skip: function(req, res) { return res.statusCode < 304 }
}));

It is logging in the expected format however it won't skip anything so appears to be completely ignoring the skip option.

Have even tried short circuiting the function to true

app.use(morgan('dev', {
            skip: function (req, res) {
                return true;
            }
        }
    )
);

colo(u)rs?

Is there an option to have the colour output like it was in express 3.0?

Custom tokens format replaces 0 by '-'

app.use(function (req, res, next) {
  req.id = 0;
  next();
});
app.use(morgan(':id'));
...

This will log - instead of 0, because I think somewhere in morgan there is something like:

value = value || '-'

which is not strict enough in this case.
I would go with something like: (to discuss)

if (value === undefined || value === null) { value = '-' }

How to change formatting?

I want change formatting in this logger ('dev') in Node.js + Express.js environment.

common usage:

    var morgan= require('morgan');
    // ...
    app.use(morgan('dev'));

result:
morgan logger - dev (default)

I need to change the formatting that I achieved the desired result:

morgan logger - dev (better formatting)

What is good approach to achieve the desired result?

My solution is not clean, because I copied implementations of tokens from core of morgan logger and I added code for format result.
I overrided (or redefined) tokens by calling morgan.token():

    morgan.token('url', function(req, res) {
       var url = req.originalUrl || req.url,
           length = 30; // length of final string
       // format result:
       return length < url.length ? url : ('' + url + repeatStr(' ', length - url.length));
    });

    morgan.token('response-time', function (req, res) {
        if (!res._header || !req._startAt) return '';
        var diff = process.hrtime(req._startAt);
        var ms = diff[0] * 1e3 + diff[1] * 1e-6;
        ms = ms.toFixed(3);
        var timeLength = 8; // length of final string
        // format result: 
        return ('' + ms).length > timeLength ? ms : repeatStr(' ', timeLength - ('' + ms).length) + ms;
    });

this is helper function:

    /**
     * Example:
     *  input: repeadStr('-', 5)
     *  output: '-----'
     */
    function repeatStr(str, count) {
        var finalStr = '' + str;
        for (var i = 0; i < count; i++) {
            finalStr += str;
        }
        return finalStr;
    }

Thanks for advices.

Why UTC string?

The date string in the logger output is in UTC. Why not output the date in local time zone? I.e., change this line to

return new Date().toString();

Syslog

Is it possible to config morgan to write to syslog via udp?

Example in "use custom token formats" section is broken

The example in the "use custom token formats" section is broken. The function in this section is missing the req argument:

morgan.token('id', function () {
  return req.id
})

It should be:

morgan.token('id', function (req) {
  return req.id
})

Is there a way to get the formatted output string inside the format function?

Im looking for a way to get the formatted string that morgan would otherwise send to the console, so I can pass it and an object representing the data to my logger. Currently I am just building the object with tokens['token'] and using that object to build up a string to output, but it is rather ugly and hard to match the format that morgan outputs on its own.

Export compile function to be used by others

Could you please export the compile function so we can define custom and colored formats like the dev one.

for example:

morgan.format('myformat', function(tokens, req, res){
  var color = 32; // green
  var status = res.statusCode;

  if (status >= 500) color = 31; // red
  else if (status >= 400) color = 33; // yellow
  else if (status >= 300) color = 36; // cyan

  var fn = morgan.compile('\x1b[0m:method :url \x1b[' + color + 'm:status \x1b[0m');

  return fn(tokens, req, res);
});

app.use(morgan('myformat'));

Currently that's not possible because compile is private

Option to skip new line when writing to stream

Hi

Is there a way to set up morgan to skip adding new line when using stream option?
I am combining morgan's output to winston and both are adding LF line feed which results in double new lines...I can strip out the newline when it comes from morgan but it would be faster if it wasn't there at all in this scenario...

Thoughts?
Amir

The ANSI Grey being used conflicts with many Themes

Many themes have trouble with the Grey ANSI color 90 that is being used in dev output.

I'm seeing this in Solarized Dark, but it is a problem in other themes as well.

Changing from 1b[90m to 1b[92m fixed the problem for me.

Last year Bower made a similar change for the same reason.

Runtime change logging level

I would like to change the format throughout runtime, is this a possibility in its current state?
ie change from 'dev' to 'combined' and the corresponding log output should be in combined format.

Response time should be a number, not a string

The token "response-time" is converted to a string. IMO the behavior should be consistent with other numeric tokens such as "status", that is a number.

To put it in context, I write logs as JSON, so the format is important and makes it much easier to further process logs (for example, calculate the average response time).

The change is easy using parseFloat. If this sounds good, I can send a PR.

how do I change the default timezone?

I found the default timezone is "+0000" in output log on my servers, How do I change the timezone?
example, change to: 02/Jun/2015:08:06:14 +0300
who know it? please help me, thanks~

how to log response message?

Hi!

Given this code:

    .get('/test', function(req,res){
      res.status(200).json({message:'everything ok'})
    })

How can I log the message with morgan?

morgan.token('json', function(req, res){ return res.body; })
app.use(morgan(':method :url :status :response-time ms - :res[content-length] :json'))

res.body is empty ?_?

I am trying for hours now, sorry if this is a stupid question.

How do I log output to file?

Hi, I was hoping you could help me out here.

I'm trying to log requests to a file. I'm using:

app.use(morgan('dev'));
app.use(morgan('common', {stream: fs.createWriteStream('./access.log', {flags: 'a'})}));

This creates a file called access.log in the root directory, I also have a 'common' flag in my console before each logged request. But, the file access.log remains empty. Is there anything I'm doing wrong here?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.