Skip to content

Releases: AmJaradat01/LogFlex

v1.3.0

07 Jul 01:51
Compare
Choose a tag to compare

logDataToFile v1.3.0

Release Description:

We are excited to announce the release of logDataToFile version 1.3.0! This update introduces significant enhancements to provide more flexible and robust logging options.

Key Features and Improvements:

  1. Support for TXT and CSV Log Files:
  • Users can now choose between logging in TXT or CSV formats using the new fileType option.
  • Both file types include headers for better organization and readability.
  1. Customizable Logging Options:
    • File Path: Specify a custom path for log files using the filePath option.
    • Date Format: Customize the timestamp format in log entries with the dateFormat option.
    • Log Level: Set the log level (info, warning, error) using the logLevel option.
  1. Improved Error Handling and Directory Creation:
    • Automatically creates necessary directories for log files if they do not exist.
  1. Detailed Documentation:
    • Updated README with comprehensive usage examples, including how to configure different logging options.
  1. Enhanced Test Coverage:
    • Added tests to cover the new functionality, ensuring reliability and correctness.

Example Usage:

Logging to a Text File:

`import { logDataToFile } from 'logdatatofile';

logDataToFile('This is a log message');
`

Logging to a CSV File:

logDataToFile('This is a log message in CSV', { filePath: './logs/custom-log', fileType: 'csv' });

Custom Log Options:

logDataToFile('This is a custom log message', { filePath: './logs/custom-log', dateFormat: 'yyyy/MM/dd HH:mm', logLevel: 'error' });

Installation:

Install the package using npm:

npm install logdatatofile

Contributing:

We welcome contributions to improve logDataToFile. Please check our [contributing guidelines]

Feedback:

Your feedback is valuable to us. Please report any issues or suggestions on our GitHub Issues page.

Thank you for using logDataToFile! We hope these new features enhance your logging experience.

Full Changelog: v1.2.5...v1.3.0