I am looking to develop a log table that logs data in its own table every time a user sends a request. I am also interested in retrieving data similar to the following:
{
_id: ObjectId('4f442120eb03305789000000'),
host: "127.0.0.1",
logname: null,
user: 'frank',
time: ISODate("2000-10-10T20:55:36Z"),
path: "/apache_pb.gif",
request: "GET /apache_pb.gif HTTP/1.0",
status: 200,
response_size: 2326,
referrer: "[http://www.example.com/start.html](http://www.example.com/start.html)",
user_agent: "Mozilla/4.08 [en] (Win98; I ;Nav)"
}
Not necessarily all of this information, but at least details on who made the request, the type of request, path, and timestamp. I am working with nodejs, mongodb, and mongoose.