hdm17-logs-extractor
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

Hard Disk Manager 17 Advanced Logs Extractor

NPM Version GitHub Release GitHub Repo stars

The Hard Disk Manager 17 Advanced Logs Extractor is a TypeScript tool designed to monitor and process log file hdmengine_jobs.log in real-time and the past.

NOTE : This library is only for the log file hdmengine_jobs.log

Installation

To use the Log Watcher Library in your project, follow these steps:

  1. Install the library via npm:

    npm install hdm17-logs-extractor

    Or via yarn:

    yarn add hdm17-logs-extractor

Usage

To start using the Log Watcher Library, you need to import it into your project and initialize it with the path to the log file you want to monitor:

import logAPI from 'hdm17-logs-extractor';

const logWatcher = logAPI.initLogWatch('path/to/your/log/file.log');

logWatcher.on('lineChanged', (logInfo) => {
  console.log('Log changed:', logInfo);
});

logWatcher.on('error', (error) => {
  console.error('Error:', error);
});

// To stop watching the log file
logAPI.stopLogWatch(logWatcher);

API Reference

  • initLogWatch(logPath: string, firstScan: boolean = true): LogWatch Initializes a new LogWatch instance for a given log file. If firstScan is true, performs an initial scan of the log file.

  • stopLogWatch(logWatch: LogWatch): void Stops watching the log file and cleans up resources.

  • getLog(log: string): LogInfo Processes a log string and returns a LogInfo object representing it.

For more details, refer to the inline documentation in the code.

Contributing

Contributions to the project are welcome!

License

This project is licensed under the MPL-2.0 License - see the LICENSE file for details.

Readme

Keywords

none

Package Sidebar

Install

npm i hdm17-logs-extractor

Weekly Downloads

2

Version

1.0.1

License

MPL-2.0

Unpacked Size

192 kB

Total Files

33

Last publish

Collaborators

  • canardconfit