logSynth is a package for generating synthetic log data with different log levels and custom templates.
You can install the package using npm:
npm i log-synthYou can generate synthetic logs using the functions provided in the package.
import { generateLogsByInterval, generateGenericLog } from './src/logGenerator.mjs';
// Example usage of generating logs by interval
generateLogsByInterval(5); // Generates a log every 5 seconds
// Example usage of generating a generic log entry
console.log('Generated Generic Log:', generateGenericLog());Generates logs at a specified interval.
seconds (number): The interval in seconds at which logs should be generated.
Generates a single generic log entry.
The logs generated will include different log levels such as INFO, ERROR, WARN, and CRITICAL.
This project is licensed under the MIT License.