Skip to content

Small python script to generate random time series data into log files

Notifications You must be signed in to change notification settings

kkailiwang/log-generator

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 

Repository files navigation

log-generator

Simple python script to generate random time series data into a log file (GMT time) useful for generating sample time-series based data to feed other downstream systems.

Usage

logGenerator.py --logFile <targetFile>
    [--minSleepMs <int>] [--maxSleepMs <int>]
    [--sourceDataFile <fileWithTextData>] [--iterations <long>]
    [--minLines <int>] [--maxLines <int>]
    [--logPattern <pattern>] [--datePattern <pattern>]

Defaults

iterations = -1 # infinite
minSleep = 0.1
maxSleep = 1
minLines = 1
maxLines = 1
logFile = 'logGenerator.log'
sourceDataFile = 'defaultDataFile.txt'
logPattern = '%(asctime)s,%(msecs)d %(process)d %(filename)s %(lineno)d %(name)s %(levelname)s %(message)s'
datePattern = "%Y-%m-%d %H:%M:%S"

About

Small python script to generate random time series data into log files

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%