Package Exports
- saveconsole
- saveconsole/logging.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (saveconsole) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
saveconsole
Saveconsole will log all of your console's stdout and stderr into -access.log and -error.log files in an organized log folder. These log files are automatically created and organized by the current date/time on the system. Additionally, Saveconsole will add a timestamp in HH:ii:ss.fff
format to each line to ensure you can accurately search your logs.
npm install saveconsole
Usage:
require("saveconsole")();
console.log("My first log file!");
console.error("Oh no my first error!");
Output:
./logs/2022-07-27-access.log
[19:37:38.544] Logging setup complete.
[19:37:38.544] My first log file!
[19:37:38.547] ExitCode 0
./logs/2022-07-27-error.log
[19:37:38.544] Oh no my first error!