1.1.0 • Published 2 years ago
file_level_logger v1.1.0
File level log in to system
Installing
Using npm:
$ npm install file_level_logger
Using bower:
$ bower install file_level_logger
Using yarn:
$ yarn add file_level_logger
Important Note
You have to make sure that , you have to use this package before calling and APIs on server.
Way of Use
note: CommonJS usage
In order to gain the CommonJS imports with require()
use the following approach:
const express = require("express");
const server =express();
const port =3000 // Entered you port
const fileLog = require("file_level_logger");
//Folder path where you want to store files
const filePath =path.join(__dirname,"./logs")
server.use(fileLog(filepath))
server.listen(port, () => console.log(`listening on port ${port}!`));