Manage all your logs in file automatically with line numbers and file names
npm install console_logger
- Automatically log file managment
- Full Control over terminal logs
- Log files path control
- Special Log function for direct use
npm install console_logger
Now require it in your sever file with self invoke function
require('console_logger')();
Now use Log()
or console.log()
in your project
Key | Value | Default | Description |
---|---|---|---|
console | true/false | true | Allow console.log to write logs in file |
log | true/false | true | Allow Log to write logs in file |
showinterminal | true | true/false | show logs in terminal |
path | string | log | Path for creating logs with corresponding to Server File |
If path parameter will not provided then a log folder will created and logs will genrate in it
Key | Value |
---|---|
From | Console/Log (from which function log genrated) |
Time | HH:MM:SS |
file | Filename |
line | Line Number in File |
msg | Message in Log/console |
require("console_logger")({console :true , log : true , showinterminal : true , log : "log"})
Log("this is a example");
or
console.log("this is a example");