1.0.1 • Published 7 months ago

log-synth v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
7 months ago

logSynth

logSynth is a package for generating synthetic log data with different log levels and custom templates.

Installation

You can install the package using npm:

npm i log-synth

Usage

You can generate synthetic logs using the functions provided in the package.

Example

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());

Functions

generateLogsByInterval(seconds)

Generates logs at a specified interval.

seconds (number): The interval in seconds at which logs should be generated.

generateGenericLog()

Generates a single generic log entry.

Log Levels

The logs generated will include different log levels such as INFO, ERROR, WARN, and CRITICAL.

License

This project is licensed under the MIT License.

1.0.1

7 months ago

1.0.0

7 months ago