#NEWLINE# def handle( self ) : #NEWLINE# #INDENT# 'Handle multiple requests.\n\n        Each request is expected to be a 4-byte length, followed by\n        the LogRecord in pickle format.\n        ' #NEWLINE# while True : #NEWLINE# #INDENT# chunk = self . connection . recv ( 4 ) #NEWLINE# if ( len ( chunk ) < 4 ) : #NEWLINE# #INDENT# break #NEWLINE# #UNINDENT# slen = struct . unpack ( '>L' , chunk ) [ 0 ] #NEWLINE# chunk = self . connection . recv ( slen ) #NEWLINE# while ( len ( chunk ) < slen ) : #NEWLINE# #INDENT# chunk = ( chunk + self . connection . recv ( ( slen - len ( chunk ) ) ) ) #NEWLINE# #UNINDENT# obj = pickle . loads ( chunk ) #NEWLINE# record = logging . makeLogRecord ( obj ) #NEWLINE# self . log_record ( record )