saveconsole

1.0.4 • Public • Published

saveconsole

NPM

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!

/saveconsole/

    Package Sidebar

    Install

    npm i saveconsole

    Weekly Downloads

    1

    Version

    1.0.4

    License

    ISC

    Unpacked Size

    6.32 kB

    Total Files

    3

    Last publish

    Collaborators

    • mal1t1a