This is a logging library used for logging directly into a collection in mongoDB.
- Change the params(_mongourl and _collectionname) in src/mongowriter.js to point to your mongourl and collection name.
- Initialize the logger.
- Initialize the mongowriter.
- Open mongodb connection for mongowriter.
- Plant the writer object to the logger (this will throw an error if connection is not established).
- Use the logger instance for logging.
- Close the created mongodb connection.
- i(tag, message) - used for info logging
- w(tag, message) - used for warning logging
- e(tag, message) - used for error logging
- t(tag, message) - used for trace logging
Note: The src/sample.js has an example of how to initialize and use the logger.