Skip to content

Instantly share code, notes, and snippets.

View tusharkumawat's full-sized avatar
💫

Tushar Kumawat tusharkumawat

💫
View GitHub Profile
@tusharkumawat
tusharkumawat / splunklogger.py
Last active January 19, 2022 12:54
How to dump loggers from python script to splunk
import logging
from splunk_handler import SplunkHandler
splunk = SplunkHandler(
host='xxx.splunkcloud.com',
port='8088',
token='xx-xx-xx-xx-xx',
index='main'
#allow_overrides=True # whether to look for _<param in log data (ex: _index)
#debug=True # whether to print module activity to stdout, defaults to False
#flush_interval=15.0, # send batch of logs every n sec, defaults to 15.0, set '0' to block thread & send immediately
<!DOCTYPE html>
<head>
<title>Responsive Black Marketing + Creative Email Signature</title>
<style>
/*Global Styles*/
body {
background: #ffffff;
padding: 0;