#NEWLINE# def __init__( self , token , http_event_server , host = '' , http_event_port = '8088' , http_event_server_ssl = True , max_bytes = _max_content_bytes ) : #NEWLINE# #INDENT# self . token = token #NEWLINE# self . batchEvents = [ ] #NEWLINE# self . maxByteLength = max_bytes #NEWLINE# self . currentByteLength = 0 #NEWLINE# if host : #NEWLINE# #INDENT# self . host = host #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . host = socket . gethostname ( ) #NEWLINE# #UNINDENT# if http_event_server_ssl : #NEWLINE# #INDENT# buildURI = [ 'https://' ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# buildURI = [ 'http://' ] #NEWLINE# #UNINDENT# for i in [ http_event_server , ':' , token , '/services/collector/event' ] : #NEWLINE# #INDENT# buildURI . append ( i ) #NEWLINE# #UNINDENT# self . server_uri = '' . join ( buildURI ) #NEWLINE# if http_event_collector_debug : #NEWLINE# #INDENT# log . debug ( self . token ) #NEWLINE# log . debug ( self . server_uri )