event_spammer_4splunk

Simple utility to spam logs into Splunk for TS purposes.
git clone git://git.thepablogq.xyz/event_spammer_4splunk
Log | Files | Refs | README

log.py (292B)


      1 import logging
      2 import random
      3 import sys
      4 
      5 logging.basicConfig(format='%(asctime)s %(levelname)s %(message)s', level=logging.INFO, stream = sys.stdout)
      6 
      7 log_messages = ['running script return 0', 'not relevant information', 'INFO SAMPLE_TEXT']
      8 
      9 logging.info(random.choice(log_messages))