@deathhound/node-log-file
TypeScript icon, indicating that this package has built-in type declarations

0.0.1 • Public • Published

Node Log File

A simple NPM package to log content to a file

Install

  • npm install @deathhound/node-log-file

Example Usage

const { Logger } = require("@deathhound/node-log-file");

// Specified directory must exist on the system
const logger = new Logger({ dirPath: `${__dirname}/logs` });

logger.log("My Log");
// file Location is at `{dirPath}/{file}.log`
// File name format is `{year}-{month}-{day}.log`
// Each individual log to the file will include the time of the log as the format `[{hours}:{minutes}:{seconds}.{milliseconds}]`

Readme

Keywords

none

Package Sidebar

Install

npm i @deathhound/node-log-file

Weekly Downloads

1

Version

0.0.1

License

none

Unpacked Size

3.91 kB

Total Files

7

Last publish

Collaborators

  • deathhound