small python script to generate random time series data into log files.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
README.md
defaultDataFile.txt
log_generator.py

README.md

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"