hdm17-logs-extractor
v1.0.1
Published
Extracts logs from Paragon Hard Disk Manager 17, a software for automated device backups
Downloads
5
Readme
Hard Disk Manager 17 Advanced Logs Extractor
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:
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. IffirstScan
istrue
, 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 aLogInfo
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.