Did I find the right examples for you? yes no

All Samples(2)  |  Call(1)  |  Derive(0)  |  Import(1)

src/w/e/web-logging-example-HEAD/handlers/records.py   web-logging-example(Download)
 
from util import generate_filename
from util import massage_record
from settings import settings
from handlers.base import BaseHandler, BaseWebSocketHandler
                timestamp = record.pop('timestamp')
                trace_file.write("%s: %s\r\n" % (timestamp, json.dumps(record)))
                record = massage_record(record, float(timestamp))
                RECORD_QUEUE.put(record)
        self.set_status(201)