Thanks to visit codestin.com
Credit goes to github.com

Skip to content

gitcrumbs/logSynth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published