1.1.7 • Published 8 months ago

ks-fastlog v1.1.7

Weekly downloads
-
License
ISC
Repository
-
Last release
8 months ago

Copy code

📄 FastLog

FastLog is a straightforward logging utility designed for Node.js. It facilitates the seamless logging of messages across various levels (info, warn, error) to a designated log file. By default, log files are generated in the project's root directory under the .ks.log folder (root-folder/.ks.log) in JSON file format. However, the log directory path can be customized to suit specific requirements.

🔌 Installation

You can install FastLog using npm:

npm install ks-fastlog

⚡ Usage

import FastLog from 'ks-fastlog';

// Log an info message
//.ks.log/info.log.json
FastLog.log('This is an info message', 'info');

// Log a warning message
//.ks.log/warn.log.json
FastLog.log({ message: 'This is a warning message' }, 'warn');

// Log an error message
//.log/error.log.json
/*
In this scenario, the error log file will be generated under the .logs directory. 
It's important to emphasize that if either the folder or the file doesn't exist, both will be created automatically.
*/
FastLog.log({ message: 'This is a error message' }, 'error', './.log');

By default, logs will be stored in a .ks.log folder in the root directory. You can specify a custom log folder by passing it as the third argument to the log function.

📖 License

This script is licensed under the MIT License.

Feel free to use, modify, and distribute this script as per the terms of the license.

License: MIT

1.1.7

8 months ago

1.1.6

8 months ago

1.1.5

8 months ago

1.1.4

8 months ago

1.1.3

8 months ago

1.1.2

8 months ago

1.1.1

8 months ago

1.1.0

8 months ago

1.0.9

8 months ago

1.0.8

8 months ago

1.0.7

8 months ago

1.0.6

8 months ago

1.0.5

8 months ago

1.0.4

8 months ago

1.0.3

8 months ago

1.0.2

8 months ago

1.0.1

8 months ago

1.0.0

8 months ago